/**********************************
 * 文件:hmi接口 头文件-soap2cpp编译用
 * 创建者:华磊
 * 创建时间:2016.11.3
 * copyright:(c)华友高科
 * 备注:有未确定数据类型,暂时"待定"
 * 修改者:
 **********************************/
#ifndef HMIAPI_H
#define HMIAPI_H

#include <vector>
#include <map>
#include <queue>

#include <string>

#import "import/stlvector.h"

#include "soapStub.h"
//vector里面不能嵌套vector,嵌套的话会把内容连接为１个。接近方案，包装为结构体
//不支持map queue?
struct WeaveMotionCondition
{
    int id;
    int motionStyle;
    double frequency;
    double width;
    double width_move;
    double height;
    int isHaltAtEdge;
    double leftHaltTime;
    double rightHaltTime;
    double rotateAngle_x;
    double rotateAngle_z;

};

struct WeldCraftStatusInfo
{
    int isVirtualControl;
    int enableCollisionCheckStatus;
    int collisionStatus;
    int weldSucess;
    int jogFeedStatus;
    double weldVoltage;
    double weldCurrency;
    double weldTime;
    double weldPwm;

};

enum E_WELD_TEST
{
    E_WELD_TEST_FEEDWIRE,
    E_WELD_TEST_WITHDRAWWIRE,
    E_WELD_TEST_GAS,
};

struct RobotCoordinateAxisConfig
{
    double t1RatioLimit;
    double targetWaitTime;
    double lineMaxSpeed;
    double lineMaxAcceleration;
    double arm_CeaseTime;
    double arm_StopTime;
    double rotate_eqradius;
    double jogDecartLineRatio;
    double jogDecartRotateRation;

};

struct BatteryPeakConfig
{
    int chargeTime;                         //电池充电时间                (单位：min----30----）
    double chargeVolume;                    //充电相对容量比              (单位：%------70----）
    double warnningBatteryLeftLightmode;    //警报时电池相对容量比        (单位：%------40----）
    double goChargeBatteryLeftLightmode;    //需要充电时点此相对容量比    (单位：%------20----）
    double shutDownBatteryLeftLightmode;    //关机时电池相对容量          (单位：%------5-----）
};

struct VehicleMovingCaligrateInfo
{
    double correctionFactor_wheelDiameter;
    double correctionFactor_wheelDistance;
    double correctionFactor_wheelDistance_height;
};

enum E_SAFETY_CHECK
{
    E_SAFETY_CHECK_emergencyStopMonitorFlag,
    E_SAFETY_CHECK_hmiServoDiMonitorFlag,
    E_SAFETY_CHECK_powerCheckFlag,
    E_SAFETY_CHECK_slowDownFlag1,
    E_SAFETY_CHECK_slowDownFlag2,
    E_SAFETY_CHECK_slowDownFlag3,
    E_SAFETY_CHECK_slowDownFlag4,
    E_SAFETY_CHECK_enableRun1Flag,
    E_SAFETY_CHECK_enableRun2Flag,
    E_SAFETY_CHECK_enableRun3Flag,
    E_SAFETY_CHECK_enableRun4Flag,
    E_SAFETY_CHECK_resetAlarmFlag,
    E_SAFETY_CHECK_extServOnFlag,
    E_SAFETY_CHECK_stopFlag,
    E_SAFETY_CHECK_ceaseFlag,
    E_SAFETY_CHECK_runFlag,
    E_SAFETY_CHECK_autoStartUpServOnFlag,
    E_SAFETY_CHECK_runSafetyCheck1Flag,
    E_SAFETY_CHECK_runSafetyCheck2Flag,
    E_SAFETY_CHECK_runSafetyCheck3Flag,
    E_SAFETY_CHECK_runSafetyCheck4Flag,
    E_SAFETY_CHECK_ultrasonicCheckFlag,
    E_SAFETY_CHECK_isEnableRun_autoMode,
    E_SAFETY_CHECK_isPlayErrorMusic,
    E_SAFETY_CHECK_isPlayBarrierMusic,
};

enum E_LIFT_STATUS
{
    E_LIFT_STATUS_MIDDLE,
    E_LIFT_STATUS_TOP,
    E_LIFT_STATUS_BUTTOM,
    E_LIFT_STATUS_UNKNOW,
    E_LIFT_STATUS_MOVINGUP_TOP,
    E_LIFT_STATUS_MOVINGDOWN_BUTTOM,
    E_LIFT_STATUS_MOVINGUP_MIDDLE,
    E_LIFT_STATUS_MOVINGDOWN_MIDDLE,
    E_LIFT_STATUS_ERROR
};



enum E_BLOCK_TYPE
{
    E_BLOCK_TYPE_NOP,//不使用电动阻挡
    E_BLOCK_TYPE_MAGANETIC,//给一个do　０或１信号就可以
    E_BLOCK_TYPE_DC_DRIVER,//一个do控制的电机
    E_BLOCK_TYPE_HEAVY_MOTOR,//2个do控制电机正反转
    E_BLOCK_TYPE_HEAVY_DIR_GO,//DIR+GO控制
    E_BLOCK_TYPE_HEAVY_CANOPEN,
};

struct AmclDebugPara
{
    int calculateTimesForLaser;
    int laser_max_beams;
    int min_particles;
    int max_particles;
    double update_min_d;
    double update_min_a;
    double odom_alpha1;
    double odom_alpha2;
    double odom_alpha3;
    double odom_alpha4;
    double odom_alpha5;
    double goodMatchScore;
    double badMatchScore;
    double newOdom_alpha_badMatchScore;
    double recovery_alpha_slow;//长时间平均随机粒子添加。
    double recovery_alpha_fast;//快速平均随机粒子添加
    int resample_interval;
    int odomOffsetFilterCount;
    bool isCorrectByReflect;
    double qualifyReflectMinCertaintyScore;
    int correctFilterCount;
    double correctAllowMaxDistanceOffset;
    double correctAllowMaxAngleOffset;
};

struct LiftMechanismConfig
{
    enum E_BLOCK_TYPE blockType;
    double heavyLift_axisId;
    int heavyTopSensor_index;
    int heavyButtomSensor_index;
    int heavyMiddleSensor_index;
    int heavyMotorPositive_index;
    int heavyMotorReverse_index;

    enum E_BLOCK_TYPE blockBType;
    double heavyLiftB_axisId;
    int heavyTopSensorB_index;
    int heavyButtomSensorB_index;
    int heavyMiddleSensorB_index;
    int heavyMotorPositiveB_index;
    int heavyMotorReverseB_index;

    bool isWatchButtonDi;
    int upButtonDiIndex;
    int downButtonDiIndex;
    double liftManualSpeed;
    int liftTimeOut;
    bool isSetSheftRegion;
    double heavyLiftSpeed;
    bool liftDirectionExchange;
};

enum E_ROLLER_STATUS
{
    E_ROLLER_STATUS_EMPTY,
    E_ROLLER_STATUS_LOADED,
    E_ROLLER_STATUS_LIN,
    E_ROLLER_STATUS_LOUT,
    E_ROLLER_STATUS_RIN,
    E_ROLLER_STATUS_ROUT,
    E_ROLLER_STATUS_ERROR,
};

struct RollerMechanismConfig
{
    int rollerMechanicalType;//滚筒机构类型。０：超时未到达报错　　１:超时跳转不报错
    int commonLeftLeaveSensor_index;//从０开始
    int commonRightLeaveSensor_index;
    int commonLeftArriveSensor_index;//从０开始
    int commonRightArriveSensor_index;
    int commonMotorPositiveDo_index;
    int commonMotorReverseDo_index;////从０开始
    int leftTopSensor_index;
    int leftButtomSensor_index;
    int rightTopSensor_index;
    int rightButtomSensor_index;
    int leftBlockDo1_index;
    int leftBlockDo2_index;
    int rightBlockDo1_index;
    int rightBlockDo2_index;
    enum E_BLOCK_TYPE leftBlockType;
    enum E_BLOCK_TYPE rightBlockType;
    int leftTopSensorB_index;
    int leftButtomSensorB_index;
    int rightTopSensorB_index;
    int rightButtomSensorB_index;
    int leftBlockDo1B_index;
    int leftBlockDo2B_index;
    int rightBlockDo1B_index;
    int rightBlockDo2B_index;
    enum E_BLOCK_TYPE leftBlockBType;
    enum E_BLOCK_TYPE rightBlockBType;
    int blockWaitTime;
    int rollerMotorType;
    int rollerTimeOut;
    int leaveDelayTime;
    int arriveDelayTime;
    bool rollerDirectionExchange;


};


enum E_COUPLE_TYPE
{
    E_COUPLE_TYPE_COMMON,
    E_COUPLE_TYPE_MAP_R,
};

struct CoupleConfigParameter
{
    volatile bool isValid;//是否工作
    enum E_COUPLE_TYPE coupleType;
    int driveAxisId;
    int followAxisId;
    volatile double followOffsetValue;
    double allowMaxFollowOffset;
    double coupleRatio;
    bool isMonitorRelativeDistance;
    double allowMinRelativeDistance;
    double allowMaxRelativeDistance;
    double approachDistance;
    double currentRelativeDistance;
    bool isNeedCease;
};

struct AxisProperty_hmi
{
    double minPosition;
    double maxPosition;
    double approachDistance;
    double maxVelocity;
    double maxFeedbackVelocity;
    double maxAccelation;
    double processVelocityFollowError;
    double processFollowError;
    double targetFollowError;
    double jogTorqueLimit;
    double motorRatedTorque;
    double motorTorqueLimitPositive;
    double motorTorqueLimitNegative;
    double maxTorque;


};

struct VehicleBorderInfo
{
    std::vector<double> x;
    std::vector<double> y;
    double offset_front;
    double offset_back;
    double offset_left;
    double offset_right;
};

struct BorderRectInfo
{
    std::vector<double> x;
    std::vector<double> y;
};


struct VehicleKinematicDimension
{
    double wa;
    double wb;
    double diameter;
};

struct LaserScanParameterHmi
{
    std::vector<double> position;
    double minAngle;
    double maxAngle;
};

struct VehicleJogControlParameter
{
    double maxVel_x;
    double maxVel_y;
    double maxVel_r;

};


struct VehicleTrajectoryControlParameter
{
    double maxVel_line;
    double maxAcc_line;
    double maxVel_rotate;
    double maxAcc_rotate;

};

struct LaserCameraCalibrateResult
{
    int isSuccess;
    std::vector<double> cameraTransfer;
    double maxError;
};

struct LaserCameraConfigParameter
{
    int protocol;
    std::string ip;
    int port;
    double xRatio;
    double zRatio;
};

struct LaserCameraStatusInfo
{
    int connectStatus;
    int laserStatus;
    int jobId;
    int isFind;
    int origin_x;
    int origin_z;
    double real_x;
    double real_z;
    double world_x;
    double world_y;
    double world_z;
    int regReadSucessCount;
};

//queue不支持，传递不了内容
struct FleetCommandDebugInfo
{
    std::vector<std::string> fleetCommandLog;
};
struct CameraReturnInfo
{
    int pointCount;
    double  x;
    double y;
    double r;
};

//焊接属性
struct WeldProperty
{
   int index; //下标
   std::string wealdEquipment; //焊机设备名称
   std::string equipmentVendors; //焊机设备商
   std::string modelName; //机种名称
   std::string fileName; //文件名
   int setingNum; //设定条件数量
   bool startTheProcess; //启动处理
   bool postProcessing; //后处理
   bool solubleApplyRemove; //溶敷解除
   bool wealdTilt; //焊接设定倾斜功能
   double gasCleaning; //气体清洗(sec)
   double prePlenum; //预送气(sec)
   double arcStartingTime; //起弧时间(sec) 启动时间
   double lagPlenum; //滞后送气(sec)
   double arcExtinguishingTime; //收弧时间(sec)
};

//焊接条件
struct WeldCondition
{
    int index; //下标
    double voltage; //焊接电压
    double amp; //焊接电流
    double weldStartVoltage; //起弧电压
    double weldStartAmp; //起弧电流
    double weldEndVoltage; //收弧电压
    double weldEndAmp; //收弧电流

    double speed; //送丝速度(mm/sec)
    double weldSpeed; //焊接速度(mm/sec)
    double dealwithTime; //处理时间(sec)
};

struct WeldSystemInfo
{
    bool arcDepletionDetection; //电弧耗尽检测
    bool gasDepletionDetection; //气体耗尽检测
    bool weldwireDepletionDetection; //焊丝耗尽检测
    bool solubleApplyTesting; //溶敷检测
    bool powerFailureDetection; //电源异常检测
    bool waterAbnormalDetection; //冷却水异常检测

    bool toOpenAction; //再开动作
    double toOpenDistance; //再开距离(mm)
    double toOpenSpeed; //再开速度(mm/s)

    bool scrapeUpArc; //刮擦起弧
    double scrapingDistance; //刮擦距离(mm)
    double returnStartPointSpeed; //返回至起弧点的速度(mm/s)
    int retryCount; //重试次数

    bool backArc; //再起弧
    int numberOfArcs; //再起弧次数

    double defaultWeldspeed; //焊接速度默认速度(cm/min)

    bool welding_microadjustment; //焊接微调整
    bool useTPforwelding; //使用TP进行焊接
    bool remote_gas_cleaning; //远程气体清洗
    bool remote_inching_wirefeed; //远程点动送丝
    bool gas_cleaning_key; //气体清洗键
    double gas_cleaning_time; //气体清洗时间(sec)
    double arcStartDetectTime;
    double arcStartMaxWaitTime;
    double arcEndDelayAlarmTime;
    double gasEndDelayAlarmTime;
};

struct VisionTrackDebugInfo
{
    bool isConnectedStatus;
    int socketErrorCode;
    int objectCount;
    struct CameraReturnInfo cameraData;
    double trigTimeOrDistance_offset;//自动计算的值
    int noResponseCount;
    int responseDifference;
};

struct BeltTrackDebugInfo
{
    int objectSize;
    int okSize;
    double currentMovedLength;
    double movingLength;
    double beltVelocity;
    bool isTracking;
    bool isMoveValidOut;
    double poseFeedback;
    double poseCommandOut;
    double acceleration;
    double holdPose;
    int moveStage;


};

struct EncoderReceiverData
{
    unsigned short doOutput;//0x6600 subindex=1 bitLength=16. 3个可用输出。
    //0x1a00
    int Encoder0_Val;//6010 1 32
    int Encoder1_Val;//6010 2 32
    int Encoder2_Val;//6010 3 32
    int Encoder0_Val_count;//圈数
    int Encoder1_Val_count;//圈数
    int Encoder2_Val_count;//圈数
//    long long Encoder0_Val_longlong;//64bit
//    long long Encoder1_Val_longlong;//64bit
//    long long Encoder2_Val_longlong;//64bit
    int Encoder0_Val_old;
    int Encoder1_Val_old;
    int Encoder2_Val_old;
    //0x1a01
    unsigned char HighSpeed_IN0;//6300 1 8
    unsigned char Ltc0_Finished;//6300 2 8
    int Ltc0_Encoder0Val;//6300 3 32
    int Ltc0_Encoder1Val;//6300 4 32
    int Ltc0_Encoder2Val;//6300 5 32
//    long long Ltc0_Encoder0Val_longlong;//64bit
//    long long Ltc0_Encoder1Val_longlong;//64bit
//    long long Ltc0_Encoder2Val_longlong;//64bit
    int Ltc0_Encoder0Val_count;//圈数
    int Ltc0_Encoder1Val_count;//圈数
    int Ltc0_Encoder2Val_count;//圈数
    int Ltc0_Encoder0Val_old;
    int Ltc0_Encoder1Val_old;
    int Ltc0_Encoder2Val_old;

    unsigned char HighSpeed_IN1;//6301 1 8
    unsigned char Ltc1_Finished;//6301 2 8
    int Ltc1_Encoder0Val;//6301 3 32
    int Ltc1_Encoder1Val;//6301 4 32
    int Ltc1_Encoder2Val;//6301 5 32
//    long long Ltc1_Encoder0Val_longlong;//64bit
//    long long Ltc1_Encoder1Val_longlong;//64bit
//    long long Ltc1_Encoder2Val_longlong;//64bit
    int Ltc1_Encoder0Val_count;//圈数
    int Ltc1_Encoder1Val_count;//圈数
    int Ltc1_Encoder2Val_count;//圈数
    int Ltc1_Encoder0Val_old;
    int Ltc1_Encoder1Val_old;
    int Ltc1_Encoder2Val_old;
    //0x1a02
    unsigned char HighSpeed_IN2;//6302 1 8
    unsigned char Ltc2_Finished;//6302 2 8
    int Ltc2_Encoder0Val;//6302 3 32
    int Ltc2_Encoder1Val;//6302 4 32
    int Ltc2_Encoder2Val;//6302 5 32
//    long long Ltc2_Encoder0Val_longlong;//64bit
//    long long Ltc2_Encoder1Val_longlong;//64bit
//    long long Ltc2_Encoder2Val_longlong;//64bit
    int Ltc2_Encoder0Val_count;//圈数
    int Ltc2_Encoder1Val_count;//圈数
    int Ltc2_Encoder2Val_count;//圈数
    int Ltc2_Encoder0Val_old;
    int Ltc2_Encoder1Val_old;
    int Ltc2_Encoder2Val_old;

    unsigned char HighSpeed_IN3;//6303 1 8
    unsigned char Ltc3_Finished;//6303 2 8
    int Ltc3_Encoder0Val;//6303 3 32
    int Ltc3_Encoder1Val;//6303 4 32
    int Ltc3_Encoder2Val;//6303 5 32
//    long long Ltc3_Encoder0Val_longlong;//64bit
//    long long Ltc3_Encoder1Val_longlong;//64bit
//    long long Ltc3_Encoder2Val_longlong;//64bit
    int Ltc3_Encoder0Val_count;//圈数
    int Ltc3_Encoder1Val_count;//圈数
    int Ltc3_Encoder2Val_count;//圈数
    int Ltc3_Encoder0Val_old;
    int Ltc3_Encoder1Val_old;
    int Ltc3_Encoder2Val_old;
    //0x1a03
    unsigned char HighSpeed_ReadOut0;//6500 1 8
    unsigned short Cmp0_FIFO_Exist;//6500 2 16
    unsigned short Cmp0_Finished_Number;//6500 3 16
    int Cmp0_Current_CmpData;//6500 4 32

    unsigned char HighSpeed_ReadOut1;//6501 1 8
    unsigned short Cmp1_FIFO_Exist;//6501 2 16
    unsigned short Cmp1_Finished_Number;//6501 3 16
    int Cmp1_Current_CmpData;//6501 4 32

    unsigned char HighSpeed_ReadOut2;//6502 1 8
    unsigned short Cmp2_FIFO_Exist;//6502 2 16
    unsigned short Cmp2_Finished_Number;//6502 3 16
    int Cmp2_Current_CmpData;//6502 4 32

    int deviceAlias;
};

struct VisionTrackConfig
{
    std::string cameraIp;
    int cameraPort;
    int cameraProtocol;
    int cameraCommunicateTimeout;
    double cameraMmPerPix_x;
    double cameraMmPerPix_y;
    int userCoordinateIndex;
    bool isTrack;//静态或皮带。
    int beltTrackIndex;
    int cameraTrigMethod;
    double trigTimeOrDistance;
    double objectMininumDistance;
    bool isWorkZoneCoincident;
    int visionZoneEncoderRecorded;
    int robotZoneEncoderRecorded;
    double cameraOffset_x;
    double cameraOffset_y;
    double cameraOffset_r;
    double objectLength;
    double trigFilterRatio;
};

struct BeltTrackConfig
{
    int trackFunction;//0 不跟踪，　１视觉跟踪，２开关跟踪
    int encoderDeviceAlias;
    int encoderIndexOnDevice;
    int doIndexOnDevice;
    int encoderDirection;
    double trackTransition_startDistance;
    double trackTransition_endDistance;
    double validTrackStartPoint_fromA;
    double validTrackEndPoint_fromA;
    int encoderValue_referenceAPoint;
    int encoderValue_referenceBPoint;
    double xValue_referenceAPoint;
    double yValue_referenceAPoint;
    double xValue_referenceBPoint;
    double yValue_referenceBPoint;
    double trackPointOffset_x;
    double trackPointOffset_y;
    double trackPointOffset_z;
    double objectMininumDistance;
    double startSprayPoint_fromA;
    double workpieceDistance;
    double stopDistance;
    double beltVelocity;
    double trackSpeedAdjust;
    double beltTransimissionAdjust;
    double beltTransimission;
    int encoderDeviceType;
};



struct MapPropertyInfo
{
   std::string mapName;
   double mapRatio;
   std::string imageName;
   double imageWidth;
   double imageHeight;
   double xOffset;
   double yOffset;
   double rOffset;
};

struct VehiclePosition
{
    double x;//m
    double y;//m
    double rotate;//unit is rad
};


struct ReflectMarkInfo
{
    bool isPlaneMark;
    int typeId;
    int uniqId;
    int groupId;
    double pose_x;
    double pose_y;
    double pose_r;
};

struct LaserMarkInfo
{
    double pose_x;
    double pose_y;
    double pose_r;
    double laserRangeValue;
    double laserAngleValue;
};

struct ReflectDebugInfo
{
    double minConsumed;
    double currentConsumed;
    double maxConsumed;
    double minumIntensity;
    double minLaserRange;//m
    double maxLaserRange;//m
    bool isMatchSucess;
    double pose_x;
    double pose_y;
    double pose_r;
    int initialLaserMarkCount;//初始符合激光点数
    int initialReferenceMarkCount;//初始参考点数

    struct VehiclePosition positionError;//可能位置误差
    struct VehiclePosition odomAccumulatedError;//里程计累计误差
    std::vector<struct ReflectMarkInfo> referenceMarks;//匹配对数
    std::vector<struct LaserMarkInfo> laserMarks;//可能的激光标记点
    int isCorrectSucess;
    int correctCount;
    struct VehiclePosition correctPositionOffset;
};

struct ReflectCommonDetectPara
{
    //一般参数
    double allowMinMarkDistance;
    double minimumReferencePointCount;//最小参考点数
    double maxmumReferencePointCount;//最多参考点数
    double maxMatchLineDistanceOffset;//not used
    double initial_AgvPositionOffset;//初始定位时　允许匹配时位置误差
    double initial_AgvAngleOffset;//初始定位时　允许匹配时角度误差
    double mached_AgvPositionOffset;//匹配后　允许匹配时位置误差
    double mached_AgvAngleOffset;//匹配后　允许匹配时角度误差
    double odomErrorRatio_position;//里程计距离误差比例系数
    double odomErrorRatio_angle;//里程计角度误差比例系数
    double laserIntensityLoseRatio;//雷达反射光强随着距离衰减的比例系数
    double matchColumnMarkDiameterTolorenceRatio;//圆柱标记识别，允许的直径偏差比例
    double matchPlaneMarkMinWidth;//匹配平面标记时，允许最小的宽度
    double matchPlaneMarkMaxWidth;//匹配平面标记时，允许最大的宽度
    double odomOffsetFilterCount;//里程计偏差滤波数
    double minCorssAngle;
    bool isCorrectByAmcl;
    double qualifyAmclMinCertaintyScore;
    int correctFilterCount;
    double correctAllowMaxDistanceOffset;
    double correctAllowMaxAngleOffset;
    double correctOdomErrorDistanceThreshold;
    double correctOdomErrorAngleThreshold;
    double idealRadius;
    int idealMatchNum;

};

struct LaserFilterParameter
{
    double minumIntensity;
    double minLaserRange;//m
    double maxLaserRange;//m
    double minAngle;//degree
    double maxAngle;
    double region_front;
    double region_back;
    double region_left;
    double region_right;
};

struct AmclDebugInfo
{
    int isCorrectSucess;
    int correctCount;
    struct VehiclePosition correctPositionOffset;
};

struct SlowAdjust
{
    double velocity;
    double newDistance;
    double newSlowDownRatio;
    double newSlowTime;
};

struct CollisionPara
{
    double barrierSlowDownDistance_x;//modify
    double barrierSlowDownDistance_y;//modify
    double barrierStopDistance_x;
    double barrierStopDistance_y;
    double pieExtendedDistance;
    std::vector<struct SlowAdjust> stepSafetyRatioList;
};

struct SafeCollisionInfo
{
    double barrierSlowDownDistance_x;//modify
    double barrierSlowDownDistance_y;//modify
//    double besideSlowDownDistance;//
//    double barrierSlowDownRatio;
    double barrierStopDistance_x;
    double barrierStopDistance_y;
    double detect_min_z;
    double detect_max_z;
    double pieExtendedDistance;
//    double rotation_slowDownDistance;
    std::vector<struct SlowAdjust> stepSafetyRatioList;
    double barrierStopDistance_x_vmark;//modify
    double barrierStopDistance_y_vmark;//modify
    double barrierSlowDownDistance_x_vmark;//new
    double barrierSlowDownDistance_y_vmark;//new
    double pieExtendedDistance_vmark;//new
    std::vector<struct SlowAdjust> stepSafetyRatioList_vmark;

    double barrierStopDistance_x_narrowA;
    double barrierStopDistance_y_narrowA;
    double barrierSlowDownDistance_x_narrowA;
    double barrierSlowDownDistance_y_narrowA;
    double pieExtendedDistance_narrowA;
    std::vector<struct SlowAdjust> stepSafetyRatioList_narrowA;

    double barrierStopDistance_x_narrowB;
    double barrierStopDistance_y_narrowB;
    double barrierSlowDownDistance_x_narrowB;
    double barrierSlowDownDistance_y_narrowB;
    double pieExtendedDistance_narrowB;
    std::vector<struct SlowAdjust> stepSafetyRatioList_narrowB;
};

struct RunningProgramInfo
{
    std::vector<std::string> fileNames;
    std::vector<int> runningLines;
    std::vector<std::vector<std::string> > programStrings;//vector里面不能嵌套vector,嵌套的话也只有一个元素可读。
};

/**
 * @brief The IOMapNamesInfo struct     保存IOMap数据
 */
struct IOMapNamesInfo
{
    std::vector <std::string> diNamesInfo;      // DI
    std::vector <std::string> doNamesInfo;      // DO
    std::vector <std::string> aiNamesInfo;      // AI
    std::vector <std::string> aoNamesInfo;      // AO
    std::vector <std::string> siNamesInfo;      // SI
    std::vector <std::string> soNamesInfo;      // SO
};


struct QrcodeDebugInfo
{
    struct VehiclePosition positionFeedback;
    int sensorId;
    bool isDeviceOpened;
    bool isImageAcquired;
    int featureSqureCount;
    double minConsumed;
    double currentConsumed;
    double maxConsumed;
};

struct PositionInfo_hmi
{
    struct VehiclePosition position;
    bool isUpdateSucess;
    double maxMatchError;
    double matchScore;
};

struct MovingToNavagationParameter
{
    double x;//mm
    double y;//mm
    double rotate;//unit is degree
    double speedRatio;//0-1之间
    bool isPositiveDirection; //正向、反向运行。华磊
    int vmarkTypeNum;//VMARK　或 QRCODE 参照索引号
    int laserTypeNum;//激光区域号码
    bool isDetectBarrier;
    int barrierRunMode;//探测方法
    int pointSensorType;//globaldefine.h MOVE_FREE_POINT_TYPE定义 ,E_MOVE_FREE_POINTS_MODE(作废）
    int  moveFreeMode;                 // 自由导航模式 wheel imu laser
    int CNT_Value;
    int moveFreeMoveTrajectoryType;   // 自由导航指令运行轨迹类型；  AUTO:自由轨迹  LINE:直线轨迹  SPLINE:样条轨迹
    float allowAccuracy;//停车精度，单位米
    int pathControlStrategy;

};


/**
 * @brief The vechileFeedbackVelocity struct
 *Get the velocity of the vechile according to the encoder counts, unit in m/s
 */


struct VehicleVelocity
{
    double x_move;//according to vehicle unit in m/s
    double y_move;
    double z_rotate;//unit is rad/s
};



struct OdemeterData
{
    struct VehicleVelocity vel;
    struct VehiclePosition pos;
};

struct PathMovingInfo
{
    int passedStationId;//最后经过的站点id，负数代表未知
    int nextStationId;//下一个站点id，负数代表未知
    int currentStationId;//当前所在的站点id，负数表示不在站点
    int passedPathId;//最后经过的路径id，负数代表未知
    int nextPathId;//下一个路径id，负数代表未知
    int currentPathId;//当前所处的路径id，负数表示不在任何路径
    int currentFloorId;
};

struct VehicleBasicInfo
{
    double odometer_history;
    double odometer_user;
    double time_history;
    double time_user;
    struct VehicleVelocity vehicleVelocityFeedback;
    double batteryLightModeLeft;
    std::vector<std::string > pointSensorName;
    std::vector<double> pointSensorSafeRatio;
    bool pointSensorCheckEnable;
    std::vector<double> ultrasonicSafeStatus;
    bool ultrasonicCheckEnable;
    std::vector<double> ultrasonicDistance;
    std::vector<std::string> ultrasonicSensorName;
    struct VehiclePosition startPosition;
    std::vector<struct VehiclePosition> targetPosition;
    int currentPathType;
    double currentPathParameter1;
    double currentPathParameter2;
    double absoluteDistanceLeft;
    double absoluteAngleLeft;
    int barrierMethod;
    int currentBorderId;
    int usingPositionType;
    int originalLaserFilterType;
    struct PositionInfo_hmi vmarkInWorld;//vmark在世界地图的位置
    struct PositionInfo_hmi vehicleInVmark;//车在ｖmark坐标系的位置
    struct PositionInfo_hmi vehicleInWorld;//车在世界坐标系位置
    struct PositionInfo_hmi vehicleInQrcode;//车在二维码坐标系的位置
    struct PositionInfo_hmi vehicleInCU1;//车在（激光＋二维码）坐标系的位置
    std::string currentMapName;
    int mapVersion;
    int currentFloorId;
    int fleetBasicStatus;
    struct PathMovingInfo pathMoveingInfo;
    std::vector<struct VehiclePosition> validCarBorder;
    struct OdemeterData encoderOdom;
};

struct VehiclePositionsInfo
{
    struct PositionInfo_hmi vmarkInWorld;//vmark在世界地图的位置
    struct PositionInfo_hmi vehicleInVmark;//车在ｖmark坐标系的位置
    struct PositionInfo_hmi vehicleInWorld;//车在世界坐标系位置
    struct PositionInfo_hmi vehicleInQrcode;//车在二维码坐标系的位置
    struct PositionInfo_hmi vehicleInCU1;//车在（激光＋二维码）坐标系的位置
};

struct VisionMatchDebugInfo
{
    int currentVmarkType;
    int currentLaserFilterType;
    double angleOfLinesOut;
    double distanceOfLinesOut;
//    std::vector<double> angleOfLinesOut;
//    std::vector<double> distanceOfLinesOut;
    int detectFailedType;
    int struct_Line1Count;
    int struct_Line2Count;
    double struct_Line1Corelation;
    double struct_Line2Corelation;

    int detectedLineCount;
    int detectedVmarkCount;
    int detectedVmarkResultCount;
    bool isMatchSucess;
    double minConsumed;//计算耗时　us
    double currentConsumed;
    double maxConsumed;
    int method;
    int maximumIterations;
    double transformationEpsilon;
    double euclideanFitnessEpsilon;
    double matchScore;
    double pos_x;
    double pos_y;
    double pos_r;

    int keyPointFactor; // 海塞矩阵阈值，在这里调整精度，值越大点越少，越精准
    float matchFactor;//越小点越少，精度越好
    float minScale;
    float maxScale;

    int baseKeyPointNum;
    int localKeyPointNum;
    int totalMatchNum;
    int goodMatchNum;
    float matchScale;
    int baseCompareCols;
    int baseCompareRows;
    int localCompareCols;
    int localCompareRows;

};

struct VMarkInfo
{
    int vindex;
    int vmarkType;
    std::string mapName;
    std::string comment;
    double pose_x;//unit is mm
    double pose_y;//unit is mm
    double pose_r;//unit is degree
};

enum ENUM_AXIS_ZERO_STATE
{
    ENUM_AXIS_ZERO_STATE_NO_CALIBRATE=0,
    ENUM_AXIS_ZERO_STATE_CALIBRATED=1,
    ENUM_AXIS_ZERO_STATE_LOSS_POWER=2,
    ENUM_AXIS_ZERO_STATE_MD5_ERROR=3
};

enum ENUM_ZERO_MANAGEMENT_STATE
{
    ENUM_ZERO_MANAGEMENT_STATE_INITIAL=0,
    ENUM_ZERO_MANAGEMENT_STATE_OK=1,
    ENUM_ZERO_MANAGEMENT_STATE_MD5_ERROR=2,
    ENUM_ZERO_MANAGEMENT_STATE_FILE_NODE_ERROR=3,
};

struct PointCloudData_3D
{
    std::string deviceName;
    std::vector<double> point_x;
    std::vector<double> point_y;
    std::vector<double> point_z;
    unsigned long long timeStamp;
};


struct TaskManagerInfo
{
    int taskSize;
    std::string robotName;
    std::vector<int> taskIndex;
    std::vector<std::string> fileName;
    std::vector<double> runningLine;
    std::vector<unsigned long long> runningThreadId;
    std::vector<bool> taskThreadIsFinished;
    std::vector<bool> taskThreadIsRunning;
    std::vector<int> state;
    std::vector<int> isInLoop;
};

struct S_AXISGROUP_ZERO_INFORMATION
{
    enum ENUM_ZERO_MANAGEMENT_STATE state;
    std::vector<int> axisZeroState;
    std::vector<int> absoluteZeroMotorValue;//机器人ＤＨ算法零位电机值　pulse
    std::vector<double> jointMechanicalZeroValue;//机器人机械零点关节值，相对于算法有偏移　mm degree
};

enum SERVO_STATUS_TYPE
{
    ENUM_SERVO_OFF,
    ENUM_SERVO_ON,
    ENUM_SERVO_END
};

enum STOP_COMMAND_TYPE
{
    ENUM_COMMAND_RESET,//停止
    ENUM_COMMAND_RUN,//运行
    ENUM_COMMAND_CEASE,//中断
    ENUM_COMMAND_END//err
};

enum E_AXISGROUP_STAGE
{
    E_AXISGROUP_STAGE_INIT,
    E_AXISGROUP_STAGE_MOVE_ONE_STEP_IN ,
    E_AXISGROUP_STAGE_COORDINATE_AXIS_ONE_STEP ,
    E_AXISGROUP_STAGE_JOINT_AXIS_ONE_STEP ,
    E_AXISGROUP_STAGE_MOVE_ONE_STEP_FINISH_NORMAL ,
    E_AXISGROUP_STAGE_MOVE_ONE_STEP_FINISH_ERROR ,


};


struct AxisGroupDebugInfo
{
    enum E_AXISGROUP_STAGE stage;
    double deltaTime;

};

enum E_REAL_THREAD_STAGE
{
    E_REAL_THREAD_IN,
    E_REAL_THREAD_MUTEX_FAILED,
    E_REAL_THREAD_SET_MOTOR_FEEDBACK,
    E_REAL_THREAD_MOVING_LOOP,
    E_REAL_THREAD_TRAJECTORY_LOOP,
    E_REAL_THREAD_DRAG_LOOP,
    E_REAL_THREAD_MAGANETIC_TRACK_LOOP,
    E_REAL_THREAD_VEHICLE_JOG_LOOP,
    E_REAL_THREAD_MOVE_ONE_STEP_DISABLE,
    E_REAL_THREAD_TIME_AXIS_MOVE_ONE_STEP,
    E_REAL_THREAD_AXIS_GROUP_MOVE_ONE_STEP,
    E_REAL_THREAD_UPDATE_TRAJTIME,
    E_REAL_THREAD_UPDATE_TRAJTIME_CNT_WAIT,
    E_REAL_THREAD_UPDATE_TRAJTIME_FINE_WAIT,
    E_REAL_THREAD_MOVE_ONE_STEP_GET_JOINT_COMMAND,
    E_REAL_THREAD_MOVE_ONE_STEP_OUT,
    E_REAL_THREAD_RECORD_WAVE,
    E_REAL_THREAD_OUT

};

enum E_COMMON_THREAD_STAGE
{
    E_COMMON_THREAD_IN,
    E_COMMON_THREAD_TRAJECTORY_LOOP,
    E_COMMON_THREAD_TRAJECTORY_CALCULATE_PATH,
    E_COMMON_THREAD_TRAJECTORY_CALCULATE_PATH_NOCOMMAND,
    E_COMMON_THREAD_TRAJECTORY_CALCULATE_PATH_WHILE,
    E_COMMON_THREAD_TRAJECTORY_CALCULATE_PATH_WHILE_BREAK,
    E_COMMON_THREAD_TRAJECTORY_CALCULATE_PATH_NORMAL_FINISH,
    E_COMMON_THREAD_DRAG_LOOP,
    E_COMMON_THREAD_HOMING_LOOP,
    E_COMMON_THREAD_END
};

struct MotionDebugInfo
{
    double deltaTime;
    double currentLineRemainingTime;
    double currentLine;
    int lineQueueSize;
    int motionServerMode;
    int basicStatus;
    int commandQueueSize;
    int isVelprofileEmpty;
    double timeAxisScale0;
    enum E_COMMON_THREAD_STAGE commonThreadStage;
    enum E_REAL_THREAD_STAGE realThreadStage;
    int threadId;
    struct AxisGroupDebugInfo axisGroupInfo;
};

enum E_PROGRAM_ENGINE_STAGE
{
    E_PROGRAM_ENGINE_INIT,
    E_PROGRAM_ENGINE_RUN_BEGINE,
    E_PROGRAM_ENGINE_RUN_LOOP,
    E_PROGRAM_ENGINE_RUN_LOOP_PROGRAM_INDEX,
    E_PROGRAM_ENGINE_RUN_LOOP_PROGRAM_INDEX_OUT,
    E_PROGRAM_ENGINE_RUN_LOOP_PROGRAM_INSTRUCTION,
    E_PROGRAM_ENGINE_RUN_LOOP_PROGRAM_INSTRUCTION_OUT,
};

enum E_PROGRAM_MOTION_STAGE
{
    E_PROGRAM_MOTION_INIT,
    E_PROGRAM_MOTION_PROCESS_INSTRUCTION_BEGIN,
    E_PROGRAM_MOTION_PROCESS_INSTRUCTION_CIRCILE_END_POINT_BEFORE,
    E_PROGRAM_MOTION_PROCESS_INSTRUCTION_CIRCILE_FIRST_POINT,
    E_PROGRAM_MOTION_PROCESS_INSTRUCTION_CIRCILE_END_POINT,
    E_PROGRAM_MOTION_PROCESS_INSTRUCTION_CNT_POINT_BEFORE,
    E_PROGRAM_MOTION_PROCESS_INSTRUCTION_NEW_POINT_BEGIN,
    E_PROGRAM_MOTION_PROCESS_INSTRUCTION_FINE_POINT_END

};


struct ProgramEngineDebugInfo
{
    enum E_PROGRAM_ENGINE_STAGE stage;
    int programIndex_currentRunning;
    int programCountNum;
    double runningLineFloat;
    int programInstructionType;
    enum STOP_COMMAND_TYPE engineStatus;
    enum E_PROGRAM_MOTION_STAGE motionStage;
    int motionInstrutionAdd;

};

struct EcatBusDevInfo_gsoap
{
    unsigned int node;//所在通信节点
    unsigned int alias;//别名
    unsigned int vendorId;//厂商ID
    unsigned int productCode;//产品码
    unsigned int revisionNumber;//修订版本号
    unsigned int serial_number;
    unsigned char al_state; /**< Current state of the slave. */
    unsigned char error_flag; /**< Error flag for that slave. */
    unsigned char sync_count; /**< Number of sync managers. */
    unsigned short sdo_count; /**< Number of SDOs. */
    int devType;//设备类型(E_EcatDevType)
    std::string devName;//设备名称
    std::string mappingObjectFile;//对象字典配置文件
};


//***GeneralDefine******************
/**
 * @brief The PointPro struct       点信息
 */
struct PointPro
{
    int jointFlag;                  //0:关节;1:笛卡尔;
    int pointNum;                   //点 编号
    int groupNum;                   //组 编号
    int ufValue;                    //用户坐标系 编号
    int utValue;                    //工具坐标系 编号
    int recordStatus;                  //在使用用户坐标系，或者是工具坐标系进行坐标系示教的时候（三点法，四点法，六点法），记录该点的示教状态，０代表未示教　　１代表已经示教
    std::string configString;       //多解 选择;多圈 选择
    std::vector<int> configInt;     //多解 选择;多圈 选择
    std::vector<double> positionValue;//关节值 or 笛卡尔值
    std::vector<double> extPositionValue;//外部轴的值，仅存在关节形式
};

/**
 * @brief 码垛点结构体。华磊修改。
 */
struct PalletPoint
{
    int palletNumber; //码垛号
    int pointType;  	  //点类型0 堆栈点。1 接近点。 2 逃离点。
    int pointNumber;  //接近点号 或 逃离点号
    std::vector<int> rowColumnLayer;//行列层
};

/**
 * @brief MoveParamater 移动参数
 */
struct MoveParameter
{
    int moveType;			//关节、直线、圆弧
    int velocityUnit;		//单位　０是百分比　１是mm/s　２是°/s
    float velocity;			//指令里面的速度值	
    struct PointPro targetPoint;//hmiAPI_update20161107.h
    struct PalletPoint palletPoint;
    int pointType;//0 普通P点, 1 码垛点, 2　PR寄存器点（华磊修改）
    int index;				//点的编号pointNum
    int cntRatio;			//cnt
    float acc;               // 加速度 类型改为float,单位是百分比
    int lineNumber;        //行号
    int wjnt;   //姿态是否控制
    int poseOffset;//0 正常，　１　直接补偿
    int poseOffsetIndex; //直接补偿PR[]
    int  toolOffset;//0 正常，　１　直接补偿
    int toolOffsetIndex; //直接补偿PR[]
    int incFlag;//0 正常，　１增量运动
    int evFlag;//附加轴运动标识。
    int evVelocity;//0-100附加轴速度比例
    int pathFlag;//路径规划曲线标识
	int singleAxisFlag;//单轴运动

};


//struct MotorCommand
//{
//    float motorPosition;
//    float motorVelocity;
//    float motorTorque;
//    float motorAcceleration;
//};

struct UserInfo
{
    int account;                    //用户ID
    std::string password;           //密码
    std::string ip;                 //IP地址
    std::string operationSystem;    //操作系统
};

/**
 * @brief The Message struct        信息结构体
 */
struct Message
{
    int MessageLevel;               //消息级别
    long time;						//产生时间(2017.02.10修改)
    int robotId;                    //机器人id
    std::string componentClassName; //组件类名
    std::string messageType;        //消息类型
    int messageCode;                //消息ID
    int parameter1;                 //消息参数1
    int parameter2;                 //消息参数2
    int parameter3;					//消息参数3
    int parameter4;					//消息参数4
    std::string MessageInformation; //消息内容(提供用户可见)
};

/**
 * @brief The ComponentVersion struct   组件版本
 */
struct ComponentVersion
{
    std::string componentName;               //组件名
    std::string componentVersion;            //组件版本
    std::string publishDate;                 //发布时间
};

/**
 * @brief The PrRegStruct struct            ｐｒ寄存器
 */
struct PrRegStruct
{
    int jointFlag; //0:关节;1:笛卡尔;
    std::vector <double> prValue;//pr寄存器的值

};

/**
 * @brief The PlRegStruct struct    pl寄存器
 */
struct PlRegStruct
{
    int row;//行
    int col;//列
    int layer;//层

};

//**hmi Use****************************************

/**
 * @brief The CurrentRunFile struct 当前运行程序
 */
struct CurrentRunFile
{
    std::vector<std::string> runingFileName;     //当前运行程序名(run)
    std::vector<int> runningFileLine;            //当前运行行号(对应上)

	std::vector<std::string> relatedFileName;	//所有关联程序名(call)
};

struct CommRobotInfo
{
	int robotId;					//当前控制的机器人ID

	std::string robotName;

	std::string robotSpecification;	//机器人规格

	int robotType;					//机器人类型

	std::string robotFileAddress;	//

	std::string robotPictureAddress;

	int robotStatus;

	std::string robotProgram;

	int robotRunSpeed;

};

struct AxisLimit
{
    double positive;
    double negative;
};

/**
 * @brief The ControllerIpGroupInfo struct      控制器ip组信息
 */
struct ControllerIpGroupInfo
{
    std::string ipAddress;		//ip地址
    std::string gateWay;		//网关
    std::string dnsServer;		//dns服务器
};

/**
 * @brief ToolCoordinateInformation hmi专用 工具坐标系信息(2017.02.10修改)
 */
struct HmiToolCoordinateInformation
{
    int index;
    float error;
    int method;
    std::vector<struct PointPro> pointList;
    std::vector<double> xyzwpr; //华磊增加
    double mass;
    std::vector<double> massCenter;
    std::string name;
};

/**
 * @brief UserCoordinateInformation hmi专用 用户坐标系信息(2017.02.10修改)
 */
struct HmiUserCoordinateInformation
{
    int index;
    int method;
    std::vector<struct PointPro> pointList;
    std::vector<double> xyzwpr; //华磊增加
    std::string name;
};

/**
 * @brief StoreStatus 存储信息结构体(2017.02.10修改)
 */
struct StoreStatus
{
	double wholeDiskMemory;		//磁盘全部容量
	double usedDiskMemory;		//磁盘已用容量

	double wholeSystemMemory;	//内存总大小
	double usedSystemMemory;	//已用内存
};


/**
 * @brief RegisterStatus 注册返回结构体(2017.02.24修改)
 */
struct ReturnRegisterStatus
{
	int returnStatus;
	std::string returnLockTime;
	std::string returnRegisterNumber;
};


//***************hmi需要更新的数据********************************
struct UpdateDataLv1
{
//int globalSerialStatus;

int globalRegStatus;			//0注册状态正常1快要过期1个星期2已经过期3永久有效4序列号不正确

std::string globalLockMachTime;	//锁机日期

std::string serialNumber;		//序列号

std::string registerNumber;		//注册码

//int globalMotorType;

std::string mainProgramVersion;

std::vector<struct ComponentVersion> componentVersionList;

//std::vector<struct UserInfo> multiUserInfo;

//int currentLanguage;

std::vector<struct AxisLimit >  axisLimit;		//轴软限位

std::vector<struct AxisLimit >  extAxisLimit;	//外部轴软限位

std::vector<int> axisUnit;			//本体轴单位

std::vector<int> extAxisUnit;		//外部轴单位 2017.03.10

std::vector<int> axisType;			//本体轴类型

std::vector<int> extAxisType;		//外部轴类型

int robotAxisCount;					//本体轴个数

int extAxisCount;					//外部轴个数

std::string controllerIp;			//控制器IP

std::string controllerMac;			//控制器MAC

std::vector <struct CommRobotInfo>  robotInfoList;

int controllerInitialStatus;//控制器初始化状态

};

struct UpdateDataLv2
{
	int globalSafePointFlag;

	int globalHandSwitch;

	float globalProSpeed;

	float globalManSpeed;

	int globalHandRunStatus;

	int globalZeroCtrlFlag;

	int globalCoordinate;

	int globalCurrentState;
    int globalCurrentState_motion;

	int globalHandState;

	int globalServoState;

	int globalZeroStatus;

	int emergencyStatus;

	int globalPosType;

	int globalDefaultUserNum;

	int globalDefaultToolNum;

	int startType;

	struct PointPro currentPositionJoint;

	struct PointPro currentPositionWorld;

	std::string currentTime;

    std::vector<double> axisTorque;

    std::vector<double> axisSpeed;

	std::vector<int> axisPosition;

	std::vector<int> axisFollowOffset;

	struct CurrentRunFile currentRunFile;

	int currentRobotID;//当前使用的机器人ID 2017.03.10
    /**
     * @brief currentProductivity       当前产量
     */
    float currentProductivity;
    /**
     * @brief accumulateProductivity    累计产量
     */
    float accumulateProductivity;

    float workpieceRatio; //单件效率
    int mainProgramFileVersion;//当前打开的主程序版本


};

struct UpdateDataLv2_agv
{
    struct VehicleBasicInfo vehicleBasicInfo;//车体基础信息
    struct PositionInfo_hmi vmarkInWorld;//vmark在世界地图的位置
    struct PositionInfo_hmi vehicleInVmark;//车在ｖmark坐标系的位置
    struct PositionInfo_hmi vehicleInWorld;//车在世界坐标系位置
    struct PositionInfo_hmi vehicleInQrcode;//车在二维码坐标系的位置
    struct PositionInfo_hmi vehicleInCU1;//车在（激光＋二维码）坐标系的位置
};

//io部分转移到此处
struct UpdateDataLv3
{
	std::vector<bool> ioIn;

	std::vector<bool> ioOut;

    std::vector<double> ai;

    std::vector<double> ao;

	std::vector<bool> si;

	std::vector<bool> so;

    std::vector<double> localRegister;

    std::vector<double> globalRegister;

	std::vector<struct PointPro > pointRegister;

    std::vector<double>  timerRegister;

	std::vector<struct PlRegStruct > plRegister;

	std::string powerOnTime;//上电时间(2017.02.10修改)

	std::string totalPowerOnTime;//累计上电时间(2017.02.14修改)

	std::string totalStartMachineOnTime;//第一次开机至今上电时间(2017.02.14修改)

	std::string servoOnTime;//使能时间(2017.02.10修改)

	std::vector <struct CommRobotInfo>  robotInfoList;//其他机器人的信息也要更新
};

struct AxisZeroOffsetInfo
{
    std::vector<double> zeroOffset;
    double maxError;
};


struct LaserCameraFrameInfo
{
    std::vector<struct PointPro> tcpPointList;
    std::vector<struct PointPro> cameraPointList;
    std::vector<double> cameraTransfer;
    double maxError;
};



//***************类型变量部分********************************
/**
 * @brief message               控制器消息[LV2]
 */
//std::vector<struct Message> messageVector;//20161108

/**
 * @brief globalSafePointFlag   安全开关是否打开的标志[LV2]
 */
//int globalSafePointFlag;

/**
 * @brief globalHandSwitch      使能开关[LV2]
 */
//int globalHandSwitch;
/**
 * @brief globalProSpeed        自动运行速度[LV2] 2017-02-24
 */
//int globalProSpeed;
/**
 * @brief globalManSpeed        手动运行速度[LV2] 2017-02-24
 */
//int globalManSpeed;
/**
 * @brief globalHandRunStatus   手动运行状态，（手动单步，手动连续）[LV2]
 */
//int globalHandRunStatus;

/**
 * @brief globalZeroCtrlFlag    回零的第二个标志位，判断回零状态（正在原点回零，回零完成）[LV2]
 */
//int globalZeroCtrlFlag;
/**
 * @brief globalCoordinate      手动坐标系[LV2]
 */
//int globalCoordinate;
/**
 * @brief globalCurrentState    程序的运行状态，（运行，暂停，停止）[LV2]
 */
//int globalCurrentState;
/**
 * @brief globalHandState       程序的运行模式（T1/T2/Auto/EXT）[LV2]
 */
//int globalHandState;
/**
 * @brief globalServoState      伺服状态[LV2]
 */
//int globalServoState;

/**
 * @brief globalZeroStatus      回零状态（是否回过零，按键Btn显示）[LV2]
 */
//int globalZeroStatus;
/**
 * @brief globalLoginStatus     登陆状态(不需要,自切换页面用)
 */
//bool globalLoginStatus;

/**
 * @brief globalSerialStatus    序列号状态（有、无序列号）[LV1]
 */
//int globalSerialStatus;
/**
 * @brief globalRegStatus       注册状态（有效、快要过期、已经过期、永久有效）[LV1]
 */
//int globalRegStatus;
/**
 * @brief emergencyStatus       急停状态[LV2]
 */
//int emergencyStatus;
/**
 * @brief globalMotorType       电机类型[LV1]
 */
//int globalMotorType;


/**
 * @brief globalPosType         点位的保存方式:（0代表X、Y、Z、W、P、R），（1代表Deg）[LV2]
 */
//int globalPosType;
/**
 * @brief globalDefaultUserNum  默认(当前)的用户坐标[LV2]
 */
//int globalDefaultUserNum;
/**
 * @brief globalDefaultToolNum  默认的工具坐标[LV2]
 */
//int globalDefaultToolNum;


/**
 * @brief globalSerialValue     序列号[LV1]
 */
//std::string globalSerialValue;
/**
 * @brief globalLockMachTime    锁机时间[LV1]
 */
//std::string globalLockMachTime;

/**
 * @brief startType             启动方式()[LV2]
 */
//int startType;
/**
 * @brief mainProgramVersion    控制器版本号[LV1]
 */
//std::string mainProgramVersion;

/**
 * @brief componentVersionList  组件版本列表[LV1]
 */
//std::vector<struct ComponentVersion> componentVersionList;

/**
 * @brief multiUserInfo         多用户信息[LV1]
 */
//std::vector<struct UserInfo> multiUserInfo;
/**
 * @brief currentLanguage       当期语言[LV1]
 */
//int currentLanguage;

/**
 * @brief currentPositionJoint  当前点 关节信息[LV2]
 */
//struct PointPro currentPositionJoint;
/**
 * @brief currentPositionWorld  当前点 世界坐标[LV2]
 */
//struct PointPro currentPositionWorld;
/**
 * @brief currentPositionTool   当前点 工具坐标[LV2]
 */
//struct PointPro currentPositionTool;
/**
 * @brief currentPositionUser   当前点 用户坐标[LV2]
 */
//struct PointPro currentPositionUser;

/**
 * @brief axisLimit             轴软限位[LV1](改动再更新)
 */
//std::vector<std::vector <float> >  axisLimit;

/**
 * @brief axisUnit              轴单位[LV1]
 */
//std::vector<int> axisUnit;

/**
 * @brief robotAxisCount        轴数[LV1]
 */
//int robotAxisCount;
/**
 * @brief extAxisCount          外部轴数[LV1]
 */
//int extAxisCount;



/**
 * @brief ioIn                  DI[LV2]
 */
//std::vector<int> ioIn;
/**
 * @brief ioOut                 DO[LV2]
 */
//std::vector<int> ioOut;
/**
 * @brief ai                    AI[LV2]
 */
//std::vector<float> ai;
/**
 * @brief ao                    AO[LV2]
 */
//std::vector<float> ao;
/**
 * @brief si                    SI[LV2]
 */
//std::vector<int> si;
/**
 * @brief so                    SO[LV2]
 */
//std::vector<int> so;
/**
 * @brief localRegister         局部寄存器[LV2]
 */
//std::vector<float> localRegister;
/**
 * @brief globalRegister        全局寄存器[LV2]
 */
//std::vector<float> globalRegister;
/**
 * @brief pointRegister         PR[LV2]
 */
//std::vector<struct PointPro> pointRegister;
/**
 * @brief timerRegister         时间寄存器[LV2]
 */
//std::vector<int>  timerRegister;
/**
 * @brief plRegister            PL[LV2]
 */
//std::vector<std::vector <int> > plRegister;

/**
 * @brief currentTime           当前时间[LV2]
 */
//std::string currentTime;
/**
 * @brief controllerIp          控制器IP[LV1]
 */
//std::string controllerIp;
/**
 * @brief controllerMac         控制器MAC[LV1]
 */
//std::string controllerMac;

/**
 * @brief axisTorque            电机力矩[LV2]
 */
//std::vector<float> axisTorque;
/**
 * @brief axisSpeed             电机速度[LV2]
 */
//std::vector<float> axisSpeed;
/**
 * @brief axisPosition          电机位置[LV2]
 */
//std::vector<int> axisPosition;
/**
 * @brief axisFollowOffset      电机跟随误差[LV2]
 */
//std::vector<int> axisFollowOffset;

/**
 * @brief currentRunFile		当前运行程序[LV2]
 */
//struct CurrentRunFile currentRunFile;

/**
 * @brief defaultUserFile       缺省程序[LV2]
 */
//std::string defaultUserFile;

/**
 * @brief controllerIsConnected 连接状态(自用)
 */
//int controllerIsConnected;

/**
 * @brief controllerFileAddress 映射地址(自用)
 */
//std::string controllerFileAddress;

/**
 * @brief robotInfoList 		机器人信息[LV1]
 */
//std::vector <struct CommRobotInfo>  robotInfoList;

/**
 * @brief powerOnTime			上电时间(hmi自用)
 */
//int powerOnTime;

/**
 * @brief servoOnTime			使能时间(hmi自用)
 */
//int servoOnTime;



/*---------------------------agv used(hmi->agvBaseControl->ros  ros->agvBaseControl)-----------------------------------------*/


enum E_MAP_SOLVER
{
    E_MAP_SOLVER_GMAPPING,
    E_MAP_SOLVER_CARTOGRAPHER,
    E_MAP_SOLVER_HECTOR
};

//enum E_LOCATION_SOLVER
//{
//    E_LOCATION_SOLVER_AMCL_LASER,
//    E_LOCATION_SOLVER_AMCL_ENCODER,
//    E_LOCATION_SOLVER_AMCL_IMU,
//    E_LOCATION_SOLVER_AMCL_LASER_IMU,
//    E_LOCATION_SOLVER_AMCL_LASER_IMU_ENCODER,
//    E_LOCATION_SOLVER_CARTOGRAPHER_LASER,
//    E_LOCATION_SOLVER_CARTOGRAPHER_LASER_IMU,

//};

enum E_LOCATION_SOLVER
{
    E_LOCATION_SOLVER_AMCL,
    E_LOCATION_SOLVER_CARTOGRAPHER_LASER,
    E_LOCATION_SOLVER_CARTOGRAPHER_LASER_IMU

};

enum E_ODOM_SOLVER
{
    E_ODOM_SOLVER_ENCODER,
    E_ODOM_SOLVER_LASER,
    E_ODOM_SOLVER_ENCODER_IMU,
    E_ODOM_SOLVER_LASER_ENCODER_IMU
};

enum E_TRAJECTORY_GLOBAL_SOLVER
{
    E_TRAJECTORY_GLOBAL_SOLVER_ASTAR,
    E_TRAJECTORY_GLOBAL_SOLVER_DIJKSTRAS,
};

enum E_TRAJECTORY_LOCAL_SOLVER
{
    E_TRAJECTORY_LOCAL_SOLVER_DWA,
    E_TRAJECTORY_LOCAL_SOLVER_BASELOCAL,
    E_TRAJECTORY_LOCAL_SOLVER_TEB
};

enum E_ROS_PACKAGE
{
    E_ROS_PACKAGE_MAIN,

};

enum E_ROS_PACKAGE_STATUS
{
    E_ROS_PACKAGE_STATUS_DOWN,
    E_ROS_PACKAGE_STATUS_NORMAL,
    E_ROS_PACKAGE_STATUS_ERROR
};

enum E_GOAL_STATUS
{
    E_GOAL_STATUS_PENDING,
    E_GOAL_STATUS_ACTIVE,
    E_GOAL_STATUS_PREEMPTED,
    E_GOAL_STATUS_SUCCEEDED,
    E_GOAL_STATUS_ABORTED,
    E_GOAL_STATUS_REJECTED,
    E_GOAL_STATUS_PREEMPTING,
    E_GOAL_STATUS_RECALLING,
    E_GOAL_STATUS_RECALLED,
    E_GOAL_STATUS_LOST,
    E_GOAL_STATUS_UNKNOWN
};

struct ControllerInformationAll
{
    bool isReturnSucess;
    struct UpdateDataLv1 dataLv1;
    struct UpdateDataLv2 dataLv2;
    struct UpdateDataLv3 dataLv3;
    std::vector<struct Message> messageVector;
    struct VehicleBasicInfo dataLv2_agv;
    std::vector<struct PointCloudData_3D> pointCloud;
};


/**
 * @brief The StackStylePointInfo class     保存示教点信息
 **/
struct StackStylePointInfo
{
    /**
     * @brief m_nMatrix 堆上示教点位置 【1，2，2】 【R，C，L】【GCODE_STACK_POSITION_RCL_COUNT】
     **/
    std::vector <int> rowColumnLayer;
    /**
     * @brief m_sStackPoint 点位信息
     **/
    struct PointPro stackPoint;
    int approachStyleIndex;
    int fleeStyleIndex;
};

struct PalletPathInfo
{
    std::vector <struct PointPro> points;
};

/**
 * @brief The StackInfo class  码垛初始信息
 **/
struct StackInfo
{
    /**
     * @brief stackName 码垛名称
     **/
    std::string stackName;
    /**
     * @brief m_nStackUpDown    堆上、堆下【种类：码垛、拆垛】0码垛 1拆垛；
     **/
    int stackUpDown;
    /**
     * @brief m_nRow    行数
     **/
    int row;
    /**
     * @brief m_nCol    列数
     **/
    int col;
    /**
     * @brief m_nLayer  层数
     **/
    int layer;
    /**
     * @brief m_nExecIncr   增加，1:增加,-1:减少
     **/
    int execIncr;
    /**
     *@brief m_nAuxiliary   是否有辅助点
     */
    int auxiliary;
    /**
     * @brief m_nExecOrder  执行顺序 【CRL、RCL】0:行列层、1:列行层
     **/
    int execOrder;
    /**
     * @brief m_nTeachOrder 示教顺序：1，底层示教；0顶层示教【方向】
     **/
    int teachOrder;
    /**
     * @brief m_nIntervalEnable 行列层三点示教是否开启：1，开启；0，关闭【开关】正常情况处于关闭状态
     **/
    std::vector <int> intervalEnable;
    /**
     * @brief m_nIntervalValue  行列层间距值【间距值】当行列层三点示教开启时，可以通过间距值从而减少需要示教的点位信息
     **/
    std::vector <float> intervalValue;
    /**
     * @brief m_nStackType  码垛类型：B、BX、E、EX
     **/
    int stackType;
    /**
     * @brief m_nStackNumber    叠栈号码
     */
    int stackNumber;
    /**
     * @brief m_nStackProximityCount    接近点数
     **/
    int stackProximityCount;
    /**
     * @brief m_nStackFleeCount 逃离点数
     **/
    int stackFleeCount;
    /**
     * @brief m_nStackStyleCount    式样点数
     **/
    int stackStyleCount;
    /**
     * @brief m_nStackRegister  栈板寄存器号码
     **/
    int stackRegisterNumber;
    /**
     * @brief m_nStackPointCount    堆上示教点个数
     **/
    int stackPointCount;
    /**
     * @brief m_nStackFinishOutputMode  码垛完成信号输出模式
     **/
    int stackFinishOutputMode;
    /**
     * @brief m_nStackFinishOutputDoNum 码垛完成信号输出DO号
     **/
    int stackFinishOutputDoNum;
    /**
     * @brief stackPointA_n 接近点
     **/
    std::vector <struct PalletPathInfo > stackPointA_nList;
    /**
     * @brief stackPointBTM 堆叠点
     **/
    struct PointPro stackPointBTM;
    /**
     * @brief stackPointR_n 逃离点
     **/
    std::vector <struct PalletPathInfo > stackPointR_nList;
    /**
     * @brief m_sStackStylePointInfo    示教点信息
     **/
    std::vector <struct StackStylePointInfo> stackStylePointInfo;
    int pathStyleCount;
};

struct PalletMiddleInfo
{
    struct StackInfo configInfo;
    struct PointPro btmPointPro;//堆叠点
    std::vector<struct PointPro> pointAnPointPro;//接近点
    std::vector<struct PointPro> pointRnPointPro;//远离点
    int finishOutput;
};



//***************hmi->baseControl 接口函数部分********************************
//测试用
int testFoundation(struct UserInfo userInfo,struct UserInfo &returnnfo);
/**
 * @brief setUToolActive    工具坐标系切换 (0~9)
 * @param userInfo          用户信息
 * @param n                 切换编号
 * @param returnFlag        默认返回(RECV OK)
 * @return
 */
int setUToolActive(struct UserInfo userInfo,int number,int &returnFlag);

/**
 * @brief setUFrameActive   用户坐标系切换(0~9)
 * @param userInfo          用户信息
 * @param n                 切换编号
 * @param returnFlag        默认返回(RECV OK)
 * @return
 */
int setUFrameActive(struct UserInfo userInfo,int number,int &returnFlag);

/**
 * @brief getUFrameActive 获取激活的工具坐标系号码(0~9)
 * @param n
 * @param returnUToolNum
 */
int getUToolActive(struct UserInfo userInfo,int &returnUToolNum);

/**
 * @brief getUFrameActive 获取激活的用户坐标系号码(0~9)
 * @param n
 * @param returnUFrameNum
 */
int getUFrameActive(struct UserInfo userInfo,int &returnUFrameNum);

/**
 * @brief UpdateControllerInfoLevel hmi获取更新数据函数
 * Level1 等级分类
 * Level2
 * returnInfo 返回信息类型未定(待定)
 * @return
 */
int updateControllerInfoLevel1(struct UserInfo userInfo,int currentRobotId,struct UpdateDataLv1 &updateDataLv1);
int updateControllerInfoLevel2(struct UserInfo userInfo,struct UpdateDataLv2 &updateDataLv2);
int updateControllerInfoLevel2_agv(struct UserInfo userInfo,struct VehicleBasicInfo &vehicleInfo);
int updateControllerInfoLevel2_positions(struct UserInfo userInfo,struct VehiclePositionsInfo &vehicleInfo);
int updateControllerInfoLevel3(struct UserInfo userInfo,struct UpdateDataLv3 &updateDataLv3);
int updateControllerMessage(struct UserInfo userInfo,std::vector<struct Message> &messageVector);

/**
 * @brief initControllerStatus      控制器初始化是否完成 状态判断
 * @return
 */
int initControllerStatus(struct UserInfo userInfo,int &initStatus);

/**
 * @brief UpdateUserProgramFile     更新用户程序hmi通过ftp映射更新文件,通过md5校验,通知控制器重新获取文件进行解析
 * @param fileName                  程序名
 * @param md5                       MD5校验码
 * @param returnFlag
 * @return
 */
int updateUserProgramFile(struct UserInfo userInfo,std::string fileName,
                          std::string md5,int &returnFlag);

/**
  * @brief 			把关节坐标转换为笛卡尔坐标或者把笛卡尔坐标转换为关节坐标
  * @param inputPointPro	输入的点位信息
  * @return　PointPro		转换后的点位数据
  */
int changePointType(struct UserInfo userInfo,struct PointPro inputPointPro,struct PointPro &pointPro);

/**
 * @brief changePasswd                     修改密码，管理员可以更改所有的的密码，普通用户只能修改普通用户密码
 * @param userInfo                  用户信息
 * @param oldPassed                    旧密码
 * @param newPasswd			新密码
 * @return				0标示失败,1标示成功
 */
int changePasswd(struct UserInfo userInfo,int changeAccount,std::string oldPassed,std::string newPasswd,int &returnFlag);

/**
 * @brief loginController                     修改密码，管理员可以更改所有的的密码，普通用户只能修改普通用户密码
 * @param userInfo                  用户信息
 * @return				0标示失败,1标示成功
 */
int loginController(struct UserInfo userInfo, std::string hmiVersion,int &returnFlag);

/**
 * @brief setDo                     设置DO
 * @param ioOutNum                  DO号
 * @param nOffOn                    ON OFF
 * @param returnFlag
 * @return
 */
int setDo(struct UserInfo userInfo,int ioOutNum,int nOffOn,int &returnFlag);

/**
 * @brief setManualSpeedPercent     设置 manual速度百分比 float 2017-02-24修改变量类型
 * @param nSpeedValue
 * @param returnFlag
 * @return
 */
int setManualSpeedPercent(struct UserInfo userInfo,float nSpeedValue,int &returnFlag);
/**
 * @brief setManualSpeedPercent     设置 auto速度百分比 float 2017-02-24修改变量类型
 * @param nSpeedValue
 * @param returnFlag
 * @return
 */
int setAutoSpeedPercent(struct UserInfo userInfo,float nSpeedValue,int &returnFlag);

/**
 * @brief setHandWheel              滚轮
 * @param axisNumber                轴
 * @param direction                 方向
 * @param velocity                  增量速度
 * @param returnFlag
 * @return
 */
int setHandWheel(struct UserInfo userInfo,int axisNumber,int direction,int velocity,int &returnFlag);

/**
 * @brief jogRun                    寸动
 * @param axisNumber                轴
 * @param direction                 方向
 * @param returnFlag
 * @return
 */
int jogRun(struct UserInfo userInfo,int axisNumber,int direction,int &returnFlag);

/**
 * @brief setProgramFileName        设置程序运行filename(openfile)
 * @param programFileName
 * @param returnFlag
 * @return
 */
int setProgramFileName(struct UserInfo userInfo,std::string programFileName,int &returnFlag);

/**
 * @brief setProgramRunLine         设置程序运行 行
 * @param line
 * @param returnFlag
 * @return
 */
int setProgramRunLine(struct UserInfo userInfo,int line,int &returnFlag);

/**
 * @brief setRunModel               程序运行的模式设置
 * @param runModel                  0 T1手动\1 T2手动\2 自动\3 EX
 * @param returnFlag
 * @return
 */
int setRunModel(struct UserInfo userInfo,int runModel,int &returnFlag);

/**
 * @brief setDebugModel             手动运行
 * @param debugModel                0 单步\1 连续
 * @param returnFlag
 * @return
 */
int setDebugModel(struct UserInfo userInfo,int debugModel,int &returnFlag);

/**
 * @brief setJogCoordinator         关节/全局/工具/用户坐标 设置
 * @param coordinator               0   1   2    3
 * @param returnFlag
 * @return
 */
int setJogCoordinator(struct UserInfo userInfo,int coordinator,int &returnFlag);

/**
 * @brief moveToPoint		移动到点
 * @param userInfo			用户信息   
 * @param moveParameter		移动到点的点位信息参数
 * @param returnFlag		返回状态标志位
 * @return
 */
int moveToPoint(struct UserInfo userInfo,struct MoveParameter moveParameter,int &returnFlag);

/**
 * @brief stepRun                   运行(底部按钮)
 * @return
 */
int programRun(struct UserInfo userInfo,int &returnFlag);

/**
 * @brief ceaseRun                  暂停(底部按钮)
 * @return
 */
int programCease(struct UserInfo userInfo,int &returnFlag);

/**
 * @brief resetRun                  重置(stop)(底部按钮)
 * @return
 */
int programReset(struct UserInfo userInfo,int &returnFlag);

/**
 * @brief returnZeroPoint           回零
 * @param userInfo
 * @param axisNumber
 * @return
 */
int returnZeroPoint(struct UserInfo userInfo,int axisNumber,int &returnFlag);

/**
 * @brief returnAllZeroPoint		回零(全部)
 * @param userInfo
 * @param axisNumber
 * @return
 */
int returnAllZeroPoint(struct UserInfo userInfo,int &returnFlag);

/**
 * @brief controllerShutDown        关机指令
 * @param userInfo
 * @param returnFlag
 * @return
 */
int controllerShutDown(struct UserInfo userInfo,int &returnFlag);


/**
 * @brief setManualServon           设置伺服使能
 * @param userInfo
 * @param nServOffOn
 * @param returnFlag
 * @return
 */
int setManualServon(struct UserInfo userInfo,int nServOffOn,int &returnFlag);


/**
 * @brief setRegisterNumber         输入注册码(修改返回值)
 * @param registerString
 * @return
 */
int setRegisterNumber(struct UserInfo userInfo,std::string registerString,struct ReturnRegisterStatus &returnStatus);


/**
 * @brief getTcpConnectState        获取当前是否断开链接
 * @param userInfo
 * @param returnFlag
 * @return
 */
int getTcpConnectState(struct UserInfo userInfo,int &returnFlag);


/**
 * @brief setClearAllCounter        清空所有产量
 * @param userInfo
 * @param returnFlag
 * @return
 */
int setClearAllCounter(struct UserInfo userInfo,int &returnFlag);

/**
 * @brief setClearCurrentCounter    清空当前产量
 * @param userInfo
 * @param returnFlag
 * @return
 */
int setClearCurrentCounter(struct UserInfo userInfo,int &returnFlag);


/**
 * @brief setRestoreFactory         恢复出厂设置,通知控制器重新启动
 * @param userInfo
 * @param returnFlag
 * @return
 */
int setRestoreFactory(struct UserInfo userInfo,int &returnFlag);


/**
 * @brief setCoordMode              坐标系设置,关节,世界,用户,工具切换
 * @param userInfo
 * @param nCoordId
 * @param returnFlag
 * @return
 */
int setCoordMode(struct UserInfo userInfo,int nCoordId,int &returnFlag);


/**
 * @brief setMsgClear               清除消息
 * @param userInfo
 * @param messageId
 * @param returnFlag
 * @return
 */
int setMsgClear(struct UserInfo userInfo,int messageId,int &returnFlag);





/**
 * @brief clearPlRegister           清空栈板暂存器
 * @param userInfo
 * @param palletNumber
 * @param returnFlag
 * @return
 */
int clearPlRegister(struct UserInfo userInfo,int palletNumber,int &returnFlag);

//
/**
 * @brief setPlRegister             栈板寄存器修改生效
 * @param userInfo
 * @param palletNumber
 * @param rowColumnLayer
 * @param returnFlag
 * @return
 */
int setPlRegister(struct UserInfo userInfo,int palletNumber,struct PlRegStruct plReg,int &returnFlag);

/**
 * @brief clearAllPlRegister        清空Pl寄存器
 * @param userInfo
 * @param returnFlag
 * @return
 */
int clearAllPlRegister(struct UserInfo userInfo,int &returnFlag);


/**
 * @brief setLocalRegister          设置局部R寄存器
 * @param userInfo
 * @param number
 * @param value
 * @param returnFlag
 * @return
 */
int setLocalRegister(struct UserInfo userInfo,int number, double value,int &returnFlag);
/**
 * @brief clearAllLocalRegister     清除所有局部寄存器
 * @param userInfo
 * @param returnFlag
 * @return
 */
int clearAllLocalRegister(struct UserInfo userInfo,int &returnFlag);
/**
 * @brief setGlobalRegister         设置全局R寄存器
 * @param userInfo
 * @param number
 * @param value
 * @param returnFlag
 * @return
 */
int setGlobalRegister(struct UserInfo userInfo,int number, double value,int &returnFlag);
/**
 * @brief clearAllGlobalRegister    清除所有全局寄存器
 * @param userInfo
 * @param returnFlag
 * @return
 */
int clearAllGlobalRegister(struct UserInfo userInfo,int &returnFlag);


/**
 * @brief clearAllPrRegister        清除所有PR寄存器
 * @param userInfo
 * @param returnFlag
 * @return
 */
int clearAllPrRegister(struct UserInfo userInfo,int &returnFlag);
/**
 * @brief setPrRegister             设置PR寄存器
 * @param userInfo
 * @param number
 * @param point
 * @param returnFlag
 * @return
 */
int setPrRegister(struct UserInfo userInfo,int number,struct PointPro point,int &returnFlag);


/**
 * @brief updateControllerProgram               发送升级包
 * @param userInfo
 * @param fileLocation
 * @param returnFlag
 * @return
 */
//int updateControllerProgram(struct UserInfo userInfo,std::string fileLocation,int &returnFlag);

/**
 * @brief restoreControllerProgramBackupFile    还原
 * @param userInfo
 * @param fileLocation
 * @param returnFlag
 * @return
 */
//int restoreControllerProgramBackupFile(struct UserInfo userInfo,std::string fileLocation,int &returnFlag);

/**
 * @brief backupControllerProgram               备份
 * @param userInfo
 * @param fileLocation
 * @param returnFlag
 * @return
 */
int backupControllerProgram(struct UserInfo userInfo,std::string fileLocation,int &returnFlag);

/**
 * @brief RestoreFactory				恢复出厂设置
 * @param userInfo
 * @param returnFlag
 */
//int restoreFactory(struct UserInfo userInfo,int &returnFlag);

/**
 * @brief setIpAddress					设置ip地址
 * @param userInfo						用户信息
 * @param controllerIpGroupInfo         ip用户组信息
 * @param returnFlag
 * @return
 */
int setIpAddress(struct UserInfo userInfo,struct ControllerIpGroupInfo controllerIpGroupInfo,int &returnFlag);
/**
 * @brief setMacAddress                 设置mac地址
 * @param userInfo                      用户信息
 * @param macAddress                    mac地址
 * @param returnFlag
 * @return
 */
int setMacAddress(struct UserInfo userInfo,std::string macAddress,int &returnFlag);
/**
 * @brief readDefaultFileName           读取缺省文件(开机时候获取缺省文件,并且打开对应文件)
 * @param userInfo                      用户信息
 * @param returnName
 * @return
 */
int readDefaultFileName(struct UserInfo userInfo,std::string &returnName);

/**
 * @brief setLanguage           		设置语言
 * @param userInfo                      用户信息
 * @param languageID
 * @return
 */
int setLanguage(struct UserInfo userInfo,int languageID,int &returnFlag);

/**
 * @brief jogRunDog           		寸动 喂狗专用
 * @param userInfo                  用户信息
 * @return
 */
int jogRunDog(struct UserInfo userInfo,int &returnFlag);

//(2017.02.10修改)新添加接口
/**
 * @brief calculateToolCoordinate 计算工具坐标系
 * @param resultToolCoordinate
 */
int calculateToolCoordinate(struct UserInfo userInfo,int robotID,struct HmiToolCoordinateInformation sendToolCoordinate,struct HmiToolCoordinateInformation &resultToolCoordinate);

/**
 * @brief calculateUserCoordinate 计算用户坐标系
 * @return resultUserCoordinate
 */
int calculateUserCoordinate(struct UserInfo userInfo,int robotID,struct HmiUserCoordinateInformation sendUserCoordinate,struct HmiUserCoordinateInformation &resultUserCoordinate);

/**
 * @brief setMsgClear               清除所有消息
 * @param userInfo
 * @param returnFlag
 * @return
 */
int setAllMsgClear(struct UserInfo userInfo,int &returnFlag);


/**
 * @brief setSo                     设置SO
 * @param soNum						SO号
 * @param nOffOn                    ON OFF
 * @param returnFlag
 * @return
 */
int setSo(struct UserInfo userInfo,int soNum,int nOffOn,int &returnFlag);

/**
 * @brief setAo                     设置AO
 * @param aoNum						AO号
 * @param aoValue                   AO值
 * @param returnFlag
 * @return
 */
int setAo(struct UserInfo userInfo,int aoNum,double aoValue,int &returnFlag);

/**
 * @brief changeAxisLimit			设置 软限位
 * @param changeLimit				软限位值
 * @return
 */
int changeAxisLimit(struct UserInfo userInfo,std::vector<struct AxisLimit> changeLimit,int &returnFlag);

/**
 * @brief getStoreStatus			hmi获取 存储状态
 * @return
 */
int getStoreStatus(struct UserInfo userInfo,struct StoreStatus &storeStatus);//获取 存储状态

/**
 * @brief getToolCoordinateInformation 获取工具坐标系列表 2017-02-24添加
 * @param toolList
 */
int getToolCoordinateInformation(struct UserInfo userInfo,int robotID,std::vector<struct HmiToolCoordinateInformation> &toolList);

/**
 * @brief getUserCoordinateInformation 获取用户坐标系列表 2017-02-24添加
 * @param userList
 */
int getUserCoordinateInformation(struct UserInfo userInfo,int robotID,std::vector<struct HmiUserCoordinateInformation> &userList);

/**
 * @brief getStoreStatus			设置安全点值 2017-02-24添加
 * @return
 */
int changeSafePoint(struct UserInfo userInfo,struct PointPro safePoint,int &returnFlag);

/**
 * @brief getStoreStatus			安全点开启关闭 2017-02-24添加
 * @return
 */
int setSafePoint(struct UserInfo userInfo,bool value,int &returnFlag);

/**
 * @brief setTimerRegister			设置时间寄存器 2017-02-24添加
 * @return
 */
int setTimerRegister(struct UserInfo userInfo,int timerNumber,int changeStatus,int &returnFlag);

/**
 * @brief setStartType				设置启动方式 2017-03-07添加
 * @return
 */
int setStartType(struct UserInfo userInfo,int type,std::string &returnString);

// 2017 07 07 添加
/**
 * @brief connectVrep				连接vrep
 * @return
 */
int connectVrep(struct UserInfo userInfo,std::string ip,int port,int &returnFlag);

/**
 * @brief disconnectVrep			断开连接vrep
 * @return
 */
int disconnectVrep(struct UserInfo userInfo,int &returnFlag);

/**
 * @brief setVrepServoType			设置vrep伺服模式
 * @return
 */
int setVrepServoType(struct UserInfo userInfo,int type,int &returnFlag);

/**
 * @brief setVrepIoType				设置vrep IO模式	
 * @return
 */
int setVrepIoType(struct UserInfo userInfo,int type,int &returnFlag);

//hualei add



int backupFile(struct UserInfo userInfo,int backUpType,int diskType,
               std::string fileName,int robotId,int &returnFlag);
int restoreFile(struct UserInfo userInfo,int backUpType,int diskType,
                std::string fileName, int robotId,int &returnFlag);
int getFileList(struct UserInfo userInfo,int pathType,std::vector<std::string>& fileList);

int clearMotorBatteryError(struct UserInfo userInfo,int &returnFlag);
int clearMotorBatteryErrorByAxis(struct UserInfo userInfo,int axisIdIn,int &returnFlag);
int controlShutDownEnable(struct UserInfo userInfo,bool enable,int &returnFlag);
int setEthercatMotorDcUserMode(struct UserInfo userInfo,int robID,int &returnFlag);//设置ＤＣ允许的时钟偏差
int setEthercatDeviceAlias(struct UserInfo userInfo,int node, unsigned short alias,int &returnFlag);
int getEthercatSlavesInformation(struct UserInfo userInfo,std::vector<struct EcatBusDevInfo_gsoap>& slavesInfo );
int getMotionServerDebugInfo(struct UserInfo userInfo,struct MotionDebugInfo& infoOut);
int getProgramEngineDebugInfo(struct UserInfo userInfo,struct ProgramEngineDebugInfo &infoOut);

int getCalibrateInformation(struct UserInfo userInfo, struct S_AXISGROUP_ZERO_INFORMATION& zeroInformationOut);
int allowSingleAxisJog(struct UserInfo userInfo,bool enable,int &returnFlag);

int clearCurrentProduction(struct UserInfo userInfo,int &returnFlag);

int clearAccumulatedProduction(struct UserInfo userInfo,int &returnFlag);

int setAllManualServon(struct UserInfo userInfo,int nServOffOn,int &returnFlag);

int setAllRunModel(struct UserInfo userInfo,int runModel,int &returnFlag);

int programAllRun(struct UserInfo userInfo,int &returnFlag);

int programAllCease(struct UserInfo userInfo,int &returnFlag);

int programAllReset(struct UserInfo userInfo,int &returnFlag);

int getProgramEngineDebugInfoList(struct UserInfo userInfo,
                                  std::vector<struct ProgramEngineDebugInfo> &infoListOut);

int getTaskInfo(struct UserInfo userInfo,struct  TaskManagerInfo &taskManagerInfo);

int getAllTaskInfo(struct UserInfo userInfo, std::vector<struct TaskManagerInfo> &taskManagerInfo);

int getSdo(struct UserInfo userInfo,  int robID,
              int axis
              ,int rObIndex
              ,int rObSubIndex
              , long long &rData );

int  setSdo(struct UserInfo userInfo, int robID, int axis
             ,int wObIndex
             ,int wObSubIndex
             , long long wData
             ,int wDataLen,int &returnFlag  );

int feedWatchDog(struct UserInfo userInfo,int &returnFlag);
int restartNfsService(struct UserInfo userInfo, int &returnFlag);

//***************AGV接口函数部分 ros->agvBaseControl********************************
//int addMessage(struct UserInfo userInfo,struct Message addMsgLog,int &returnFlag);

int getOdometer(struct UserInfo userInfo,int robotIdIn,struct OdemeterData& odemeterDataReturn);

int vehicleAuto(struct UserInfo userInfo,int robotIdIn, double xMove, double yMove, double rotate,int &returnFlag);

int getWheelMoveSpeed(struct UserInfo userInfo,int robotIdIn, std::vector<double>&wheelMoveSpeed);

int getWheelPathLength(struct UserInfo userInfo,int robotIdIn, std::vector<double>&wheelPathLength);

//***************AGV接口函数部分 hmi->agvBaseControl->ros********************************

//地图
int setMapSolver(struct UserInfo userInfo,enum E_MAP_SOLVER solverIn,
                 int laserCount,int &returnFlag);
int createMapStart(struct UserInfo userInfo,int &returnFlag);
int createMapEnd(struct UserInfo userInfo,std::string mapName,int &returnFlag);
int loadMap(struct UserInfo userInfo,std::string mapName,int &returnFlag);
int deleteMap(struct UserInfo userInfo,std::string mapName,int &returnFlag);
//添加虚拟墙
int addVitrualBlock(struct UserInfo userInfo,std::string configFilePath,int &returnFlag);
int deleteVitrualBlock(struct UserInfo userInfo,int &returnFlag);
int addForbidenZone(struct UserInfo userInfo,double x_start,double y_start
                    ,double x_end,double y_end,int &returnFlag);

//定位
int setOdomSolver(struct UserInfo userInfo,enum E_ODOM_SOLVER solverIn,int &returnFlag);//选择odom enum 方法 int 返回标志
int setLocationSolver(struct UserInfo userInfo,enum E_LOCATION_SOLVER solverIn,int &returnFlag);
int getVehiclePosition(struct UserInfo userInfo,struct VehiclePosition& positionReturn);
int setVehiclePosition(struct UserInfo userInfo,struct VehiclePosition positionIn,int &returnFlag);

//轨迹规划和行驶
int setReplanCoutLimitWhenFailure(struct UserInfo userInfo,int countLimit,int &returnFlag);
int setTrajectoryGlobalPlanSolver(struct UserInfo userInfo,enum E_TRAJECTORY_GLOBAL_SOLVER solverIn,int &returnFlag);//选择全局规划器 enum 全局规划器 int 返回标志
int setTrajectoryLocalPlanSolver(struct UserInfo userInfo,enum E_TRAJECTORY_LOCAL_SOLVER solverIn,int &returnFlag);//选择局部规划器 enum 局部规划器 int 返回标志
int moveToPosition(struct UserInfo userInfo,struct VehiclePosition positionIn,
                   double velocity,int &returnFlag);
int moveFollowPath(struct UserInfo userInfo,std::vector<struct VehiclePosition> pathIn,
                   double velocity,int &returnFlag);
int changeVelocity(struct UserInfo userInfo,double velocity,int &returnFlag);
int getMovingStatus(struct UserInfo userInfo,enum E_GOAL_STATUS& status);
int getRemainningTime(struct UserInfo userInfo,double &timeOut);
int getRemainningDistance(struct UserInfo userInfo,double &distanceOut);
int ceaseMotion(struct UserInfo userInfo,int &returnFlag);
int startMotion(struct UserInfo userInfo,int &returnFlag);
int cancelMotion(struct UserInfo userInfo,int &returnFlag);

//设置
int setPositionArrivedAccuracy(struct UserInfo userInfo,double accuracyIn,int &returnFlag);
int setLocalPlanRange(struct UserInfo userInfo,double rangeIn,int &returnFlag);
int setVehicleBorderOffset(struct UserInfo userInfo,std::vector<double> point_x, std::vector<double> point_y,int &returnFlag);
int setGlobalBarrierOffset(struct UserInfo userInfo,double offsetIn,int &returnFlag);
int setLocalBarrierOffset(struct UserInfo userInfo,double offsetIn,int &returnFlag);
int resetRosAll(struct UserInfo userInfo,int &returnFlag);

//状态
int getRosPackageStatus(struct UserInfo userInfo,enum E_ROS_PACKAGE package,enum E_ROS_PACKAGE_STATUS &status);

//IMU校准
int startImuCalibrate(struct UserInfo userInfo,int &returnFlag);
int stopImuCalibrate(struct UserInfo userInfo,int &returnFlag);

//信息传递
//int getMessage(struct UserInfo userInfo,std::vector<struct Message> &messageListReturn);

//int setWheelOdometerData(struct UserInfo userInfo,int robotIdIn,struct OdemeterData odemeterDataReturn,int &returnFlag);

//int getVehicleVelocityComand(struct UserInfo userInfo,int robotIdIn,struct  VehicleVelocity &velocityComamnd);

//int setWheelMoveSpeed(struct UserInfo userInfo,int robotIdIn, std::vector<double>wheelMoveSpeed,int &returnFlag);

//int setWheelPathLength(struct UserInfo userInfo,int robotIdIn, std::vector<double>wheelPathLength,int &returnFlag);

int getCurrentMapName(struct UserInfo userInfo,std::string &mapNameReturn);


int manual_stop(struct UserInfo userInfo,int &returnFlag);
int clear_odomter(struct UserInfo userInfo,int &returnFlag);
int calibrateVehicle(struct UserInfo userInfo,double xOffset,double yOffset,double rOffset,int &returnFlag);
int setVehicleBorderOffset_rect(struct UserInfo userInfo,double front_offsetIn,double back_offsetIn,
                           double left_offsetIn,double right_offsetIn,int &returnFlag);


int get_vehicle_basic_info(struct UserInfo userInfo,struct VehicleBasicInfo &basicInfoReturn);
int get_map_list(struct UserInfo userInfo,std::vector<std::string> &mapNameListReturn);

int getAllPointCloud_translated(struct UserInfo userInfo,std::vector<struct PointCloudData_3D> &pointCloudOut);
int getCarBorder(struct UserInfo userInfo,std::vector<struct VehiclePosition> &carBorderOut);
int getCarBorderOffset(struct UserInfo userInfo,std::vector<struct VehiclePosition> &carBorderOffsetOut);

int getVehiclePosition_specified(struct UserInfo userInfo,int typeIn,struct PositionInfo_hmi &positionReturn);

int setCurrentVMarkIndex(struct UserInfo userInfo,int indexIn,int &returnFlag);
int setCurrentVMarkType(struct UserInfo userInfo,int currentVmarkTypeIn,int &returnFlag);
int getVmarkInfoList(struct UserInfo userInfo, std::vector<struct VMarkInfo> &vmarkInfoOut);
int updateVMarkFile(struct UserInfo userInfo,std::string vmarkFileIn,int &returnFlag);
int createVMark(struct UserInfo userInfo, struct VMarkInfo infoIn, std::string vmarkFileIn, int &returnFlag);
int getVMarkPositionInWorld(struct UserInfo userInfo, struct PositionInfo_hmi &positionReturn);

int getMatchDebugInfo_vmark(struct UserInfo userInfo,struct VisionMatchDebugInfo &infoOut);
int setLaserFilterByType_vmark(struct UserInfo userInfo,int typeIn,int &returnFlag);

int setUltrasonicSensorCheckEnable(struct UserInfo userInfo,bool isOn,int &returnFlag);
int setPointCloudCheckEnable(struct UserInfo userInfo,bool isOn,int &returnFlag);
int moveToNavgationPoint(struct UserInfo userInfo,struct MovingToNavagationParameter parameterIn,int &returnFlag);

int setDefaultMapName(struct UserInfo userInfo,std::string fileNameIn, int &returnFlag);
int setCheckVehiclePosition_amcl(struct UserInfo userInfo,bool isCheck,int &returnFlag);
int setLaserIntensityFilterByType_visionMatch(struct UserInfo userInfo,int typeIn,int &returnFlag);//与setLaserFilterByType_vmark重复
int setDefaultProgramFile(struct UserInfo userInfo,std::string inProgramName,int &returnFlag);

int getRobotProgramFileList(struct UserInfo userInfo,std::vector<std::string> &programFileListOut);
int readRobotProgramFile(struct UserInfo userInfo,std::string fileName, std::vector <std::string> &fileStringListOut);
int writeRobotProgramFile(struct UserInfo userInfo,std::string fileName,std::vector <std::string> fileStringIn,int &returnFlag);
int get_robot_program_files_strings(struct UserInfo userInfo,int languageId,struct RunningProgramInfo &infoOut);
int get_running_program_file_strings(struct UserInfo userInfo,int languageId,std::string fileName,
                                     std::vector<std::string> &infoOut);

// Get Control IO
int get_di_names_info(struct UserInfo userInfo,std::vector<std::string> &namesOut);
int get_do_names_info(struct UserInfo userInfo,std::vector<std::string> &namesOut);
int get_ai_names_info(struct UserInfo userInfo,std::vector<std::string> &namesOut);
int get_ao_names_info(struct UserInfo userInfo,std::vector<std::string> &namesOut);
int get_so_names_info(struct UserInfo userInfo,std::vector<std::string> &namesOut);
int get_si_names_info(struct UserInfo userInfo,std::vector<std::string> &namesOut);

// Set Control IO
int set_di_name_info(struct UserInfo userInfo,int indexIn,std::string nameIn,int &returnFlag);
int set_do_name_info(struct UserInfo userInfo,int indexIn,std::string nameIn,int &returnFlag);
int set_ai_name_info(struct UserInfo userInfo,int indexIn,std::string nameIn,int &returnFlag);
int set_ao_name_info(struct UserInfo userInfo,int indexIn,std::string nameIn,int &returnFlag);
int set_si_name_info(struct UserInfo userInfo,int indexIn,std::string nameIn,int &returnFlag);
int set_so_name_info(struct UserInfo userInfo,int indexIn,std::string nameIn,int &returnFlag);
int removeRobotProgramFile(struct UserInfo userInfo, std::string fileName, int &returnFlag);

int getAllIoNamesinfo(struct UserInfo userInfo, struct IOMapNamesInfo &nameOut);

int getRobotLogFileInfo(struct UserInfo userInfo, std::vector<struct Message> &messagesLogOut);

int getSafeCollisionInfo(struct UserInfo userInfo,int sensorType, struct CollisionPara &infoOut);
int setSafeCollisionInfo(struct UserInfo userInfo, int sensorType, struct CollisionPara infoIn, int &returnFlag);

int getQrcodeDebugInfo(struct UserInfo userInfo,struct QrcodeDebugInfo &infoOut);

//int get_robot_running_program_files_info(struct UserInfo userInfo,std::vector<std::string> &fileNames,
//                                         std::vector<int> &runningLines);//原来有接口

int getAllReferenceMarks(struct UserInfo userInfo,std::vector<struct ReflectMarkInfo> &reflectMarksOut);
int addReferenceMarkToMap(struct UserInfo userInfo,struct ReflectMarkInfo markIn,int &returnFlag);
int saveReferenceMarkToFile(struct UserInfo userInfo,std::string fileNameIn,int &returnFlag);
int deleteReferenceMarkInMap(struct UserInfo userInfo,int uniqId,int &returnFlag);
int getReflectDebugInfo(struct UserInfo userInfo,struct ReflectDebugInfo &matchDebugInfoOut);
int setOriginalLaserFilterType(struct UserInfo userInfo,int typeIn,int &returnFlag);

int calculateZeroOffset(struct UserInfo userInfo,std::vector<struct PointPro> pointList,struct AxisZeroOffsetInfo &returnInfo);
int calibrateRobotByOffset(struct UserInfo userInfo,std::vector<double> offsetIn,int &returnFlag);
int getFleetMap(struct UserInfo userInfo,std::string mapName,std::string &mapInfoReturn);
int writeFleetMap(struct UserInfo userInfo,std::string mapName,std::string mapInfoIn,int &returnFlag);
int getMapPropertyInfo(struct UserInfo userInfo,std::string mapName,struct MapPropertyInfo &infoOut);
//&引用只能传回，传入会为空。vector嵌套vector可能会数据传递为空。
int getVisionTrackConfigList(struct UserInfo userInfo,std::vector<struct VisionTrackConfig> &configListOut);
int getBeltTrackConfigList(struct UserInfo userInfo,std::vector<struct BeltTrackConfig> &configListOut);
int changeVisionTrackConfig(struct UserInfo userInfo,int id,struct VisionTrackConfig configIn,int &returnFlag);
int changeBeltTrackConfig(struct UserInfo userInfo,int id,struct BeltTrackConfig configIn,int &returnFlag);

int getEncoderReciverDataList(struct UserInfo userInfo,std::vector<struct EncoderReceiverData> &dataListReturn);
int getBeltTrackDebugInfo(struct UserInfo userInfo,int index,struct BeltTrackDebugInfo &infoOut);
int getVisionTrackDebugInfo(struct UserInfo userInfo,int index,struct VisionTrackDebugInfo &infoOut);
//不支持std::queue<std::string>
int getSocketFleetCommandLog(struct UserInfo userInfo,struct FleetCommandDebugInfo &fleetCommandLogOut);
int getModbusFleetCommandLog(struct UserInfo userInfo,struct FleetCommandDebugInfo &fleetCommandLogOut);

//焊接属性的获取与编辑
int getWeldPropertConfigList(struct UserInfo userInfo, std::vector<struct WeldProperty> &configListOut);
int changeWeldPropertConfigList(struct UserInfo userInfo, struct WeldProperty configIn,int &returnFlag);

//焊接条件的获取与编辑
int getWeldConditionConfigList(struct UserInfo userInfo, std::vector<struct WeldCondition> &configListOut);
int changeWeldConditionConfigList(struct UserInfo userInfo, struct WeldCondition configIn,int &returnFlag);

//弧焊系统配置信息的获取与编辑
int getWeldSystemInfo(struct UserInfo userInfo, struct WeldSystemInfo &weldSystemInfo);
int changeWeldSystemInfo(struct UserInfo userInfo, struct WeldSystemInfo configIn,int &returnFlag);

int getLaserCameraConfigParameter(struct UserInfo userInfo, struct LaserCameraConfigParameter &infoOut);
int getLaserCameraStatus(struct UserInfo userInfo, struct LaserCameraStatusInfo &infoOut);
int setLaserCameraConfigParameter(struct UserInfo userInfo, struct LaserCameraConfigParameter parameter,int &returnFlag);
int reconnectLaserCamera(struct UserInfo userInfo, int &returnFlag);
int setLaserCameraWork(struct UserInfo userInfo,bool isWork, int &returnFlag);
int setLaserCameraJobId(struct UserInfo userInfo,int jobIdIn, int &returnFlag);

int calculateLaserCameraFrame(struct UserInfo userInfo,std::vector<struct PointPro> tcpPointList,
                              std::vector<struct PointPro> cameraPointList,struct LaserCameraCalibrateResult &resultOut);
int getLaserCameraFrameInfo(struct UserInfo userInfo,struct LaserCameraFrameInfo &infoOut);

int getAgvBorderInfo(struct UserInfo userInfo,struct VehicleBorderInfo &infoOut);
int setAgvBorderRectInfo(struct UserInfo userInfo,struct BorderRectInfo rectInfoIn,int &returnFlag);

int getVehicleKinematicDimension(struct UserInfo userInfo,struct VehicleKinematicDimension &infoOut);
int setVehicleKinematicDimension(struct UserInfo userInfo,struct VehicleKinematicDimension infoIn,int &returnFlag);

int getLaserScanParameter(struct UserInfo userInfo,int laserId,struct LaserScanParameterHmi &infoOut);
int setLaserScanParameter(struct UserInfo userInfo,int laserId,struct LaserScanParameterHmi infoIn,int &returnFlag);

int getVehicleJogControlParameter(struct UserInfo userInfo,struct VehicleJogControlParameter &infoOut);
int setVehicleJogControlParameter(struct UserInfo userInfo,struct VehicleJogControlParameter infoIn,int &returnFlag);

int getVehicleTrajectoryControlParameter(struct UserInfo userInfo,struct VehicleTrajectoryControlParameter &infoOut);
int setVehicleTrajectoryControlParameter(struct UserInfo userInfo,struct VehicleTrajectoryControlParameter infoIn,int &returnFlag);

int getAgvSheftInfo(struct UserInfo userInfo,int borderIndex,struct BorderRectInfo &infoOut);
int setAgvSheftRectInfo(struct UserInfo userInfo,int borderIndex,struct BorderRectInfo rectInfoIn,int &returnFlag);

int getVehiclePositionCalibrateInfo(struct UserInfo userInfo,struct VehiclePosition &infoOut);

int setWeldVirtualMode(struct UserInfo userInfo,bool isVirtualControlIn,int &returnFlag);
int getWeldIsVirtualStatus(struct UserInfo userInfo,int &returnFlag);
int getImageStringFormImagePath(struct UserInfo userInfo,std::string imagePathIn,std::string &imageStrOut);
int setCoupleControlEnable(struct UserInfo userInfo,int followAxisId,bool isEnableIn,int &returnFlag);
int setCoupleRelativeDistanceMonitorEnable(struct UserInfo userInfo,int followAxisId,bool isEnableIn,int &returnFlag);
int setAxisProperty(struct UserInfo userInfo,int axisId, struct AxisProperty_hmi axisPropertyIn,int &returnFlag);
int getAxisProperty(struct UserInfo userInfo,int axisId, struct AxisProperty_hmi &axisPropertyOut);
int getCoupleControlInfo(struct UserInfo userInfo, std::vector<struct CoupleConfigParameter> &infoOut);

/**
 * @brief SetSingleCaliber          单轴零点标定设置
 * @param userInfo
 * @param asixId
 * @param returnFlag
 * @return
 */
int setRobotSingleAxisCaliberate(struct UserInfo userInfo,int asixId,int &returnFlag);
/**
 * @brief SetAllCaliber             零点标定设置
 * @param userInfo
 * @param asixId
 * @param returnFlag
 * @return
 */
int setRobotAllAxisCaliberate(struct UserInfo userInfo,int &returnFlag);
int forceTrigCamera(struct UserInfo userInfo,int visionIndexIn,int isHightIn,int &returnFlag);
int getEncoderValue_vision(struct UserInfo userInfo,int visionIndexIn,int &encoderValueOut);
int getEncoderValue_belt(struct UserInfo userInfo,int beltIndexIn,int &encoderValueOut);

int getRollerMechanismStatus(struct UserInfo userInfo,enum E_ROLLER_STATUS &statusOut);
int setRollerMechanismConfig(struct UserInfo userInfo,struct RollerMechanismConfig configIn,int &returnFlag);
int getRollerMechanismConfig(struct UserInfo userInfo,struct RollerMechanismConfig &configOut);
int  getLiftMechanismStatus(struct UserInfo userInfo,enum E_LIFT_STATUS &statusOut);
int setLiftMechanismConfig(struct UserInfo userInfo,struct LiftMechanismConfig configIn,int &returnFlag);
int getLiftMechanismConfig(struct UserInfo userInfo,struct LiftMechanismConfig &configOut);
int setSefetyCheck(struct UserInfo userInfo,enum E_SAFETY_CHECK typeIn,int isEnable,int &returnFlag);
int getSefetyCheck(struct UserInfo userInfo,enum E_SAFETY_CHECK typeIn,int &checkStatusReturn);
int setCurrentVehicleBorderId(struct UserInfo userInfo,int idIn,int &returnFlag);//更新等效边框．
int getCurrentVehicleBorderId(struct UserInfo userInfo,int &idOut);
int setAmclPara(struct UserInfo userInfo,struct AmclDebugPara paraIn,int &returnFlag);
int getAmclPara(struct UserInfo userInfo,struct AmclDebugPara &paraOut);
int setEthernetIpAddress(struct UserInfo userInfo,std::string netNameIn,std::string ipIn,int &returnFlag);
int getVehicleMovingCaligrateInfo(struct UserInfo userInfo,struct VehicleMovingCaligrateInfo &infoOut);
int setCalibrateWheelDiameter(struct UserInfo userInfo,double idealMovedLength,double actualMovedLength,int &returnFlag);
int setCalibrateWheelDistance(struct UserInfo userInfo,double idealMovedAngle,double actualMovedAngle,int &returnFlag);
int getControllerAllInformation(struct UserInfo userInfo,bool isContainIoData,bool isContainAgvData,
                                         bool isContainPointCloud,struct ControllerInformationAll &infoOut);

int getReflectLaserFilterParameter(struct UserInfo userInfo,int index,struct LaserFilterParameter &paraOut);
int setReflectLaserFilterParameter(struct UserInfo userInfo,int index,struct LaserFilterParameter  paraIn,int &returnFlag);

int getReflectCalculateCommonParameter(struct UserInfo userInfo,struct ReflectCommonDetectPara &paraOut);
int setReflectCalculateCommonParameter(struct UserInfo userInfo,struct ReflectCommonDetectPara paraIn,int &returnFlag);

int getAmclDebugInfo(struct UserInfo userInfo,struct AmclDebugInfo &debugInfoOut);

int getBatteryPeakConfig(struct UserInfo userInfo,struct BatteryPeakConfig &configOut);
int setBatteryPeakConfig(struct UserInfo userInfo,struct BatteryPeakConfig configIn,int &returnFlag);

int forceConnectCamera(struct UserInfo userInfo,int visionIndex,int &returnFlag);
int getRobotCoordinateConfig(struct UserInfo userInfo,struct RobotCoordinateAxisConfig &configOut);
int setRobotCoordinateConfig(struct UserInfo userInfo,struct RobotCoordinateAxisConfig configIn,int &returnFlag);
int setDragControl(struct UserInfo userInfo,bool isOn,int &returnFlag);
int setGravityVector(struct UserInfo userInfo,std::vector<double> gravityIn,int &returnFlag);
int setToolMass(struct UserInfo userInfo,int toolIndex, double mass, std::vector<double> center,int &returnFlag);

int getWeldDebugStatusInfo(struct UserInfo userInfo,struct WeldCraftStatusInfo& infoOut);
int weldDebugOperation(struct UserInfo userInfo,enum E_WELD_TEST typeIn,bool control,int &returnFlag);
int setWeldCollisionCheck(struct UserInfo userInfo,bool isCheck,int &returnFlag);
int getWeaveMotionConditionInfo(struct UserInfo userInfo,std::vector<struct WeaveMotionCondition> &infoOut);
int setWeaveMotionConditionInfo(struct UserInfo userInfo,struct WeaveMotionCondition infoIn,int &returnFlag);
int getPalletConditionInfo(struct UserInfo userInfo,std::vector<struct PalletMiddleInfo> &infoOut);
int setPalletConditionInfo(struct UserInfo userInfo,struct StackInfo infoIn,int &returnFlag);
int addProgramMoveCommand_hmi(struct UserInfo userInfo,std::vector<struct MoveParameter> tmpCommandVectorIn,int &returnFlag);

#endif // HMIAPI_H
